summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-10-19 02:26:16 +0000
committerClint Adams <clint@users.sourceforge.net>2007-10-19 02:26:16 +0000
commit87e5a95601b4e975b734d7d22e9d9d532e5057a1 (patch)
tree25517dd83adc8aa47a9222cab932676d766c701a
parent1ef67287332288d3008d4e2554f1c1b42e27e63a (diff)
downloadzsh-87e5a95601b4e975b734d7d22e9d9d532e5057a1.tar.gz
zsh-87e5a95601b4e975b734d7d22e9d9d532e5057a1.tar.xz
zsh-87e5a95601b4e975b734d7d22e9d9d532e5057a1.zip
23994: tweaks for 23993.
-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' \