Closed humblehacker closed 4 days ago
On which platform are you?
I have the same problem on openSUSE Leap 15.5 (git 2.35.3) and Tumbleweed (git 2.41.0). On debian (git 2.39.2) it works fine.
There is probably something different in the git internal completion helpers that makes the difference.
edit: Correction, it works on Leap 15.5.
On which platform are you?
macOS 14
And which git version?
git version 2.41.0
Ok, that confirms what I thought.
Looking into /usr/share/zsh/functions/Completion/Unix/_git
in the different versions I see changes how _git_third_party_commands
is handled.
I would have to debug what's going on. Any help from git zsh completion experts welcome =)
So in git 2.35.3 /usr/share/zsh/functions/Completion/Unix/_git
is loaded once I type git s<tab>
.
In the newer git it is not loaded.
@humblehacker do source /usr/share/zsh/functions/Completion/Unix/_git
and then try a completion again.
Now to find out why it isn't loaded...
btw, I also noticed recently that in the newer git advanced completion doesn't work either, so it's not only a problem with third party completions.
for example git b<tab>
would normally also list my aliases starting with b
, in the newer git it only shows two subcommands, bisect and branch.
Or doing git push fork :b<tab>
would normally complete all remote branches starting with b
.
I haven't gotten around investigating this.
do
source /usr/share/zsh/functions/Completion/Unix/_git
and then try a completion again.
Mine was in a different directory (probably because macOS/homebrew), but when I source /usr/share/zsh/5.9/functions/_git
completions do start working.
Looks like an unlucky coincidence that something broke in zsh git completions right at the time I installed git-subrepo for the first time.
Thanks for taking a look.
Completions work for me with git 2.41.0, git-subrepo 0.4.6 and zsh 5.9.
Can this be closed?
I've installed
git-subrepo
by cloning the repo into~/usr/src/git-subrepo
. Then I've addedsource $HOME/usr/src/git-subrepo/.rc
to my.zshrc
file.I can type
git subr<tab>
and it will complete togit subrepo
but subsequent tab presses don't complete correctly. That is, I get a list of files instead of subcommands. If I instead callgit-subrepo
directly (with the-
) and press tab, I get the correct set of subcommands.Regular
git
commands complete correctly. For example,git submodule <tab>
shows me the correct list of subcommands.I'm sure it's probably some misconfiguration on my side, but I've tried a bunch of things and so far nothing is helping. Hopefully one of you has seen this before.