Re: Bash completion for git aliases containing nested subcommands
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Oct 3, 2022, 15:43 UTC
- Message-ID
- <20221003154354.GC7659@szeder.dev>
- In-Reply-To
- <1839e62f930.285a.8a94aeaa49923dfb9a7d55a303990d0a@posteo.de>
On Mon, Oct 03, 2022 at 03:07:10PM +0000, Tim Jaacks wrote:
Show 8 quoted lines
> Hi Gabor, > > thanks a lot for your detailed reply! I tried that and it works, thank you. > > Just another small follow-up question, out of curiosity: I noticed that zsh > handles the alias completion correctly out of the box (using the exact same > gitconfig file). I don't have any dedicated zsh completion file, just > installed zsh via apt. Do you know why and how zsh handles this differently?
There are not only one but two Zsh completion scripts for Git:
- Ours, which is essentially a wrapper around our Bash completion
script, so it shouldn't work for your alias, and it has to be
installed manually, so I doubt that this is what you tried. - One that's shipped with Zsh, with all the bells and whistles that
Zsh's completion system offers. It's not maintained by the Git
project, and I have no idea how it works, but I guess it works
sufficiently differently to make your use case work.