Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#527300: git-log branchname <TAB> suggests refs instead of pathnames



On Wed, May 06, 2009 at 06:15:50PM +0200, martin f krafft wrote:
> git log branchname [-- ]path<TAB> (with or without --)
> 
> This should suggest local files (and index files), but not more
> refs.

Does this do the right thing?

Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.120
diff -u -r1.120 _git
--- Completion/Unix/Command/_git	20 Apr 2009 03:15:43 -0000	1.120
+++ Completion/Unix/Command/_git	6 May 2009 16:33:22 -0000
@@ -1815,8 +1815,8 @@
   case $state in
     (files)
       _arguments -S \
-        '::index file:__git_cached_files' \
-        '*::branch:__git_commit_ranges2' && ret=0
+        ':branch:__git_commit_ranges2' \
+        '*:index file:__git_cached_files' && ret=0
       ;;
   esac
 }



Messages sorted by: Reverse Date, Date, Thread, Author