about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-03-09 12:16:54 +0000
committerClint Adams <clint@users.sourceforge.net>2008-03-09 12:16:54 +0000
commit2448f0f7aaf1cbb6bcaa5857f33ff893541ee1ff (patch)
treea857bc54b04bbc6e24a5f6269d5cc54f797bdcfb
parent25413054c11fc4b67284d4d6db48272182da1d26 (diff)
downloadzsh-2448f0f7aaf1cbb6bcaa5857f33ff893541ee1ff.tar.gz
zsh-2448f0f7aaf1cbb6bcaa5857f33ff893541ee1ff.tar.xz
zsh-2448f0f7aaf1cbb6bcaa5857f33ff893541ee1ff.zip
24701: use $service instead of $words[1] so completion will work if git is an alias to a wrapper.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 70ee0fedb..86148a574 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-09  Clint Adams  <clint@zsh.org>
+
+	* 24701: Completion/Unix/Command/_git: use $service instead of
+	$words[1] so completion will work if git is an alias to a wrapper.
+
 2008-03-08  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 24699: Src/hist.c, Src/input.c, Src/lex.c,
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index c597d94f3..d15f3599e 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4138,7 +4138,7 @@ __git_is_indexed () {
     unset tmpwords
   fi
 
-  if [[ $words[1] == git ]]; then
+  if [[ $service == git ]]; then
     local state line
     declare -A opt_args
     _arguments -C \
@@ -4155,12 +4155,12 @@ __git_is_indexed () {
         __git_aliases_and_commands
         ;;
       (options)
-        curcontext="${curcontext%:*:*}:git-$words[1]:"
-        _call_function ret _git-$words[1]
+        curcontext="${curcontext%:*:*}:git-$service:"
+        _call_function ret _git-$service
         ;;
     esac
   else
-    _call_function ret _$words[1]
+    _call_function ret _$service
   fi
 }