git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 11 in “Contributed bash completion support for core Git tools.”
  1. Contributed bash completion support for core Git tools.Shawn Pearce, Sep 18, 2006
  2. Junio C HamanoSep 18, 2006
  3. Shawn PearceSep 18, 2006
  4. Junio C HamanoSep 28, 2006
  5. Shawn PearceSep 28, 2006
  6. Johannes SchindelinSep 18, 2006
  7. Shawn PearceSep 18, 2006
  8. Junio C HamanoSep 18, 2006
  9. Shawn PearceSep 18, 2006
  10. Sebastian HarlSep 18, 2006
  11. Shawn PearceSep 18, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.