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

Re: [QUERY] Why do we have git-completion.zsh?

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Apr 21, 2013, 06:56 UTC
Message-ID
<CALkWK0khqsPurJpeXjsBGbXi--1T+88w9edbSRCFSO75nUcUZw@mail.gmail.com>
In-Reply-To
<CAMP44s0e=RTC_-JeFXxrdQ9Zhe8riqWKwdeae6rgwJccr_=7iA@mail.gmail.com>
Felipe Contreras wrote:
> First of all, 'gitfast' is just the name I gave to the oh-my-zsh
> plugin that uses git.git's completion stuff. The zsh support in git's
> bash completion has been working for years, I just copied the stuff to
> oh-my-zsh so those guys can use it easily.
Yeah, I know.  I just used the name.
Show 9 quoted lines
> Secondly, I don't see what "features" zsh's git completer might have
> that we don't. Yes, some specific argument behaviors are nice, like
> adding a '=' after --git-dir, and then complete only directories, and
> completion descriptions, along with tag groupings, but all those
> things are cosmetic, and they could be added relatively easy to my
> thin wrapper (which wouldn't be so thin after all). It's mostly grunt
> work, not something that requires a great mind.
>
> Functionally I don't see any value.
> Are these minor features worth all this slowness and complicated code?
> I don't think so.

Moved to using git.git's completer, and I see that you're absolutely right about the "minor features" missing part. I just assumed that zsh's completer must be more complete because it's so much larger than git.git's bash/zsh completer. Working backwards from zsh's completer would've been a nightmare.

Show 7 quoted lines
> The reason why I prefer git.git's bash completion is that it has taken
> years to develop, and using good development practices, borrowed from
> the mainline git process. Many more people use them, have debugged
> them through the years, and optimized them. It's relatively small
> (compared to zsh's version), much more readable, and it even has tests
> (which I helped to start), and it's much less buggy. It's basically
> rock solid.

Great! I'll stop working on zsh's completer immediately, and try to redirect my attention on improving git.git's completer instead.

Thanks for the information.
Previous: Felipe Contreras
Message 8 of 8 in “[QUERY] Why do we have git-completion.zsh?”
  1. Ramkumar RamachandraApr 20, 2013
  2. Jonathan NiederApr 20, 2013
  3. Jonathan NiederApr 20, 2013
  4. Felipe ContrerasApr 20, 2013
  5. Felipe ContrerasApr 21, 2013
  6. Ramkumar RamachandraApr 21, 2013
  7. Felipe ContrerasApr 21, 2013
  8. Ramkumar RamachandraApr 21, 2013

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.