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

Re: Fix a typo in _git.



On Mon, Aug 18, 2008 at 10:10:40PM +0200, Mikael Magnusson wrote:
> Now that I actually rebased my stuff on top of latest cvs, and include
> _call_program, I notice what I think is the reason I removed it: It
> doesn't work. Does it work for you? It's kind of weird, all the other
> _call_program in _git work fine, just the three git for-each-ref don't.
> And they work fine with the _call_program \S+ removed...

Oops.

Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.78
diff -u -r1.78 _git
--- Completion/Unix/Command/_git	18 Aug 2008 01:55:29 -0000	1.78
+++ Completion/Unix/Command/_git	18 Aug 2008 22:43:19 -0000
@@ -2972,7 +2972,7 @@
   local expl
   declare -a branch_names
 
-  branch_names=(${${(f)"$(_call_program headrefs git for-each-ref --format='%(refname)' refs/heads refs/remotes 2>/dev/null)"}#refs/(heads|remotes)/})
+  branch_names=(${${(f)"$(_call_program headrefs git for-each-ref --format='"%(refname)"' refs/heads refs/remotes 2>/dev/null)"}#refs/(heads|remotes)/})
   __git_command_successful || return
 
   _wanted heads expl branch-name compadd $* - $branch_names HEAD
@@ -2983,7 +2983,7 @@
   local expl
   declare -a tag_names
 
-  tag_names=(${${(f)"$(_call_program tagrefs git for-each-ref --format='%(refname)' refs/tags 2>/dev/null)"}#refs/tags/})
+  tag_names=(${${(f)"$(_call_program tagrefs git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/})
   __git_command_successful || return
 
   _wanted tags expl tag-name compadd $* - $tag_names
@@ -3036,7 +3036,7 @@
   local expl
   declare -a branch_names
 
-  branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='%(refname)' refs/heads 2>/dev/null)"}#refs/heads/})
+  branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
   __git_command_successful || return
 
   _wanted branch-names expl branch-name compadd $* - $branch_names



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