On Mon, Nov 2, 2020 at 5:05 PM Aaron Schrab <aaron@xxxxxxxxxx> wrote: > The option that you consider to be invalid is definitely *my* preferred > option. That Homebrew's git package installs the completion in a way > that overrides that from the zsh package was a source of continual > annoyance for me until I put in a long-term workaround for that (I had > just been removing the symlink every time I noticed that it had been > created by a new install of the git package). You are probably a minority. Just put the location of your desired completion in front of your fpath fpath=(/usr/share/zsh/functions/Completion/Unix $fpath) > While the completion provided by git.git may be faster, the one from zsh > is fast enough on the repositories that I generally work with. There's no such thing as "fast enough" for most Git developers. > At least > with my configuration and the completion code currently shipped by > Homobrew's git package there are at least a couple of things that seem > to be quite broken. If they are still broken in this version: https://github.com/felipec/git-completion Feel free to open an issue report. > The one that generally caused me to notice that the wrong completion > code was being used is that it doesn't provide completion for creating > local branches to based off of remote ones; I'd previously thought that > was just a missing feature, but looking into it a bit more now it looks > like that **should** happen as long as I don't set > GIT_COMPLETION_CHECKOUT_NO_GUESS=1. That was a bug because somebody added a new function to the Bash script and forgot to add it to the Zsh script. I've sent the fix: https://lore.kernel.org/git/20201028020712.442623-14-felipe.contreras@xxxxxxxxx/ > The other thing that seems to not work with the completion from git.git > is completion of single-dash options. Although that may be more of a > missing feature rather than something that's broken. Since there isn't > any description for long options, I'd guess there wouldn't be for short > options either; in which case there isn't really any point to trying to > offer completion for those. But, having additional descriptions for > options is one of my favorite features of zsh completion. That's a feature request. It may work at some point, but it would require a lot of work. In the meantime you can simply use the default Zsh completion. The point of the Zsh completion is to offer everything the Bash completion offers. Which is clearly fine for most people, since that's the completion most people use. Cheers. -- Felipe Contreras