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

PATCH: Fix a bug in _git's clone completion



There was a backslash missing at a line end, which screwed up things.

Also, I don't understand the completion after 'git clone --bare <tab>'.
It does not give me *any* completions, while I would expect the same
completions as without the --bare option.

If I do 'git clone --bare -<tab>', I only get a small subset of the
remaining options. I don't know what is happening here.

Finally, I do not understand why the end of the _arguments call was
done like this:

[snip]
    ':repository:__git_any_repositories' \-
    '*:directory:_directories' && ret=0-
[snap]

...and not just: '*:repository:__git_any_repositories' && ret 0

If someone can explain, please do ahead. :)


Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.89
diff -u -r1.89 _git
--- Completion/Unix/Command/_git	24 Aug 2008 19:48:09 -0000	1.89
+++ Completion/Unix/Command/_git	28 Aug 2008 15:51:53 -0000
@@ -1613,7 +1614,7 @@
   _arguments \
     '--bare[make a bare GIT repository]' \
     '(-l --local)'{-l,--local}'[perform a local cloning of a repository]' \
-    '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]'
+    '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]' \
     '--reference[reference repository]:repository:_directories' \
     '(-q --quiet)'{-q,--quiet}'[operate quietly]' \
     '(-n --no-checkout)'{-n,--no-checkout}'[do not checkout HEAD after clone is complete]' \



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