Re: [PATCH] Contributed bash completion support for core Git tools.
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Sep 18, 2006, 17:29 UTC
- Message-ID
- <20060918172958.GB31140@spearce.org>
- In-Reply-To
- <Pine.LNX.4.63.0609181012180.19042@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 8 quoted lines
> 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.