summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_git3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b42f6c144..ede9650e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2007-10-19  Clint Adams  <clint@zsh.org>
 
+	* 23994: Completion/Unix/Command/_git: tweaks for 23993.
+
 	* Mikael Magnusson: 23993: Completion/Unix/Command/_git: improved
 	completion for git show.
 
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 86b767611..95acdaf33 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1011,6 +1011,7 @@ _git-show-ref () {
 (( $+functions[_git-show] )) ||
 _git-show () {
   local curcontext=$curcontext state line
+  typeset -A opt_args
   __git_setup_revision_arguments
 
   _arguments -S \
@@ -1021,7 +1022,7 @@ _git-show () {
     (object)
       compset -P '*:'
       if [[ -n $IPREFIX ]]; then
-        __git_tree_files $IPREFIX[1,-2]
+        __git_tree_files ${IPREFIX%:}
       else
         _alternative \
           'revisions:revision:__git_revisions' \