Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

Re: [PATCH] Contributed bash completion support for core Git tools.

From: Shawn Pearce <hidden>
Date: 2016-06-15 22:42:40

Johannes Schindelin [off-list ref] wrote:
the only gripe I have with it: whenever some options are added, or 
removed, or renamed, you have to adapt the completion script. That is why 
I started (ages ago) to auto-generate the completion script from the 
documentation (of course, this means that the options have to be described 
consistently in the documentation, which is good in its own).

Unfortunately, I never got around to finish it, but a preliminary version 
is in the mailing list archives.
I was torn about putting options into the completion list.  Right now
"-l -b -f" are available for 'git checkout' but I think that was
a bad idea.  There's little point in offering completion for an
option which is a single character.  But that's my opinion and I'm
sure someone else might actually find it useful.

Longer options however such as "--since" or "--pretty=" with its
associated format options, or the merge strategy argument to "-s"
would all be nice to have completion support for.  However I did
not implement these.
 
However, since your script works well, and I do not have a working script, 
you clearly won! So, unless some kind soul actually implements my 
proposal, I am happy with your script.
I was mainly getting tired of copying and pasting or retyping
branch names and remote names.  So that's what I implemented.
(And remote names aren't quite right as they don't tab complete
the ones available in .git/config.)

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help