about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a6a449993..7fbcf51ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-11-07  Oliver Kiddle <opk@zsh.org>
 
+	* Benjamin R. Haskell: 30737: Completion/Unix/Command/_git:
+	make custom completion functions for git aliases easier
+
 	* users/17382: Completion/Unix/Type/_remote_files,
 	Completion/Unix/Command/_vim, Completion/Unix/Command/_git,
 	Completion/Unix/Type/_urls: complete URLs for vim and make
@@ -299,5 +302,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5752 $
+* $Revision: 1.5753 $
 *****************************************************
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2c0c0b270..2b6a36956 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6073,7 +6073,7 @@ _git() {
     aliases=(${(f)${${${(f)"$(_call_program aliases git config --get-regexp '\^alias\.')"}#alias.}/ /$'\n'}/(#e)/$'\n'})
     (( $#aliases % 2 == 0 )) && git_aliases=($aliases)
 
-    if (( $+git_aliases[$words[2]] && !$+commands[git-$words[2]] )); then
+    if (( $+git_aliases[$words[2]] && !$+commands[git-$words[2]] && !$+functions[_git-$words[2]] )); then
       local -a tmpwords expalias
       expalias=(${(z)git_aliases[$words[2]]})
       tmpwords=(${words[1]} ${expalias})