Skip to content

Instantly share code, notes, and snippets.

@jaredmoody
Created December 17, 2016 00:49
Show Gist options
  • Save jaredmoody/0b1ec36d174e78f0d84ee574c683fef3 to your computer and use it in GitHub Desktop.
Save jaredmoody/0b1ec36d174e78f0d84ee574c683fef3 to your computer and use it in GitHub Desktop.
ZSH alias reminders
_-accept-line () {
emulate -L zsh
local -r GREEN=$'\e[32m' RESET_COLORS=$'\e[0m'
for k in "${(@k)aliases}"; do
[[ $aliases[$k] =~ $BUFFER ]] &&
echo -nE $'\n'"${GREEN}Alias Match: $k -> $aliases[$k]${RESET_COLORS}"
done
zle .accept-line
}
zle -N accept-line _-accept-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment