mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-06-30 13:39:59 +02:00
Fix alias tips
This commit is contained in:
@ -11,7 +11,7 @@ source ${zsh_dir}/aliases/general.zsh
|
|||||||
source ${zsh_dir}/aliases/git.zsh
|
source ${zsh_dir}/aliases/git.zsh
|
||||||
source ${zsh_dir}/aliases/node-js.zsh
|
source ${zsh_dir}/aliases/node-js.zsh
|
||||||
source ${zsh_dir}/aliases/flutter.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
|
# Setup Antigen, and import plugins
|
||||||
source ${zsh_dir}/helpers/setup-antigen.zsh
|
source ${zsh_dir}/helpers/setup-antigen.zsh
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
# If an alias for the command just run exists, then show tip
|
# If an alias for the command just run exists, then show tip
|
||||||
preexec_alias-finder() {
|
preexec_alias-finder() {
|
||||||
tip=$(alias | grep -E "=$1$")
|
tip=$(alias | grep -E "=$1$" | head -1)
|
||||||
if [ ! -z "$tip" ]; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11,4 +11,4 @@ preexec_alias-finder() {
|
|||||||
autoload -U add-zsh-hook
|
autoload -U add-zsh-hook
|
||||||
|
|
||||||
# Call function after command
|
# Call function after command
|
||||||
add-zsh-hook preexec preexec_alias-finder
|
add-zsh-hook preexec preexec_alias-finder
|
||||||
|
Reference in New Issue
Block a user