Skip to content

Commit

Permalink
feat(git aliases): skip function aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 7, 2020
1 parent 44432b2 commit 2733d6b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions zsh-abbr.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,16 @@ _zsh_abbr() {
key=${${git_alias%% *}#alias.}
value=${git_alias#* }

if ! (( ZSH_ABBR_INITIALIZING )); then
abbreviation=${(q)abbreviation}
expansion=${(q)expansion}
fi
if [[ ${value[1]} == '!' || ${${(z)value}[1]} == 'git' ]]; then
echo "Skipped\n $git_alias\n"
else
if ! (( ZSH_ABBR_INITIALIZING )); then
abbreviation=${(q)abbreviation}
expansion=${(q)expansion}
fi

_zsh_abbr:util_add "g$key" "git $value"
_zsh_abbr:util_add "g$key" "git $value"
fi
done

if ! (( dry_run )); then
Expand Down

0 comments on commit 2733d6b

Please sign in to comment.