summary refs log tree commit diff
diff options
context:
space:
mode:
-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
 }