From a57a8b2721e022421a852c075c831b62cb0039cd Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 31 Oct 2022 17:20:41 +0000 Subject: [PATCH] Fix alias tips --- zsh/.zshrc | 2 +- zsh/aliases/alias-tips.zsh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index a38d2db..2a6b8e8 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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 diff --git a/zsh/aliases/alias-tips.zsh b/zsh/aliases/alias-tips.zsh index a00fcc0..c2d3a90 100644 --- a/zsh/aliases/alias-tips.zsh +++ b/zsh/aliases/alias-tips.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 \ No newline at end of file +add-zsh-hook preexec preexec_alias-finder