Re: [PATCH] completion: zsh: support completion after "git -C <path>"
"Lutz Lengemann" <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Hi On Tue, Aug 18, 2026, at 14:13, D. Ben Knoble wrote: > No worries! Hope you enjoyed. (I didn't see v2 come in anywhere, but > I'll keep my eye out.) I pushed the new change to my github repo, and then the PullRequest here was updated: https://github.com/gitgitgadget/git/pull/2155/changes > > and --git-dir and friends are spelled "--git-dir=-", which > > accepts only "--git-dir=<path>", not the "--git-dir <path>" form. I can > > send patches for those separately. > > We were discussing this recently in some threads about Bash > completion, and I think we landed on "gitcli(1) really prefers the > stuck form, and so do completion helpers, so let's stick with that for > now" ? Ok, sound good. > > I tried that and it works, but it changes what -C offers, which is more > > than fixing the completion after -C, so I left it out; happy to send it > > on top. Two things to watch out for there: the accumulated path has to > > be made absolute, as -W with ".." gave me the directories of "/", and > > the accumulation has to stop before the word that is being completed. > > A follow-up is fine with me if you decide to send it (and if not, > that's fine, too). Lets see if Ican find the time for that ;) Would really love to see the change in git, makes me a bit proud that I added something to the one application almost all developers use. Regards Lutz