Re: Bash completion for git aliases containing nested subcommands
- From
Tim Jaacks <timjaacks@posteo.de>
- Date
- Oct 4, 2022, 11:21 UTC
- Message-ID
- <em34822e40-c62f-43aa-bc9b-2a87e9033ee8@acer-switch-tim>
- In-Reply-To
- <YzthDLdqeQx6bEcj@coredump.intra.peff.net>
Hi Peff,
thanks a lot for your reply.
> It feels like this ought to be able to work, for the same reason that > "git stash show <TAB>" works. In the non-aliased case, we call into > _git_stash(), and it sees that "show" is already there on the command > line. But in the aliased case, we know "show" is part of the alias but > throw away that information completely, and never feed it to > _git_stash() at all.
I actually got the same impression when looking into the __git_aliased_command implementation. I just wasn't familiar enough with the code to actually come up with a solution. So thanks for your patch, that makes my use-case work indeed! Do you think there's a chance to get this upstream?
Best wishes, Tim