Created
December 17, 2016 00:49
-
-
Save jaredmoody/0b1ec36d174e78f0d84ee574c683fef3 to your computer and use it in GitHub Desktop.
ZSH alias reminders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_-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