mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-01-25 05:18:39 +01:00
Fix alias tips
This commit is contained in:
parent
bcd2ab8182
commit
a57a8b2721
@ -11,7 +11,7 @@ source ${zsh_dir}/aliases/general.zsh
|
||||
source ${zsh_dir}/aliases/git.zsh
|
||||
source ${zsh_dir}/aliases/node-js.zsh
|
||||
source ${zsh_dir}/aliases/flutter.zsh
|
||||
# source ${zsh_dir}/aliases/alias-tips.zsh
|
||||
source ${zsh_dir}/aliases/alias-tips.zsh
|
||||
|
||||
# Setup Antigen, and import plugins
|
||||
source ${zsh_dir}/helpers/setup-antigen.zsh
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
# If an alias for the command just run exists, then show tip
|
||||
preexec_alias-finder() {
|
||||
tip=$(alias | grep -E "=$1$")
|
||||
tip=$(alias | grep -E "=$1$" | head -1)
|
||||
if [ ! -z "$tip" ]; then
|
||||
echo -e "\033[0;90m\e[3mTip: \e[4m$tip\033[0m"
|
||||
echo -e "\033[0;90m\e[3mAlias Tip: \e[4m$tip\033[0m"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -11,4 +11,4 @@ preexec_alias-finder() {
|
||||
autoload -U add-zsh-hook
|
||||
|
||||
# Call function after command
|
||||
add-zsh-hook preexec preexec_alias-finder
|
||||
add-zsh-hook preexec preexec_alias-finder
|
||||
|
Loading…
Reference in New Issue
Block a user