summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2012-11-07 21:23:06 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2012-11-07 21:23:06 +0000
commitce658b3c3c941262a0517594066b74e5ffe3c7f1 (patch)
tree7ff4bbf4281b66c69418ee4e10f57dd3a1dc2bf6
parenta8ffff2cb774a83584e4467b14c41517973c5468 (diff)
downloadzsh-ce658b3c3c941262a0517594066b74e5ffe3c7f1.tar.gz
zsh-ce658b3c3c941262a0517594066b74e5ffe3c7f1.tar.xz
zsh-ce658b3c3c941262a0517594066b74e5ffe3c7f1.zip
Benjamin R. Haskell: 30737: make custom completions for git aliases easier
-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})