Subject: Re: Bash completion for git aliases containing nested subcommands

From: SZEDER Gábor <[email-masked]>
Date: Mon, 3 Oct 2022 17:43:54 +0200

On Mon, Oct 03, 2022 at 03:07:10PM +0000, Tim Jaacks wrote:
> 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.