Skip to content

Instantly share code, notes, and snippets.

@DLakomy
Last active July 3, 2023 18:07
Show Gist options
  • Save DLakomy/b4fcd96903a5e0f445592c500e3b7005 to your computer and use it in GitHub Desktop.
Save DLakomy/b4fcd96903a5e0f445592c500e3b7005 to your computer and use it in GitHub Desktop.
# alias cd="rm -rf" defender
# I think I'll sleep better knowing what aliases do I get
# from the various scripts I use in zshell...
# ...
# at the end of the .zshrc file add this:
# to recreate the reference file, use the command `alias > .aliases-reference` in your home directory
if ! diff -U0 ~/.aliases-reference --label reference <(alias) --label aliases; then
local RED='\033[0;31m'
local NC='\033[0m'
echo "${RED}The list of aliases doesn't match the .aliases-reference file!${NC}"
echo "Review the differences and act accordingly"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment