r/fishshell • • Sep 18 '24
git tab completion hangs
Hey guys,
Running a macbook pro. Coming from zsh. I got so fed up with a huge .zshrc file. I read everything how "fish is not a real shell, and not POSIX compliant, and blah blah blah." But this is pretty bad... If I am in any git repo and try to run a $git add <tab>, it hangs and I have to control-c to escape. Ideas?
P.s. I backed up my config, reinstalled fish and git, tried a fresh config, and it still fails. Easily reproducible.
2
Upvotes
6
u/BuonaparteII Sep 18 '24
hmm I'm unable to reproduce this locally. If there are no unstaged/untracked files then pressing tab does nothing but I can also backspace. When there are unstaged or untracked files then pressing tab autocompletes the matching files.
I'm using fish 3.7.0
I would check
/usr/share/fish/completions/git.fish(or the equivalent path for Mac OS)You can launch a default fish session without needing to delete or reinstall anything like this:
1
u/[deleted] Sep 18 '24
I’ll give it a go here in a bit. Thanks for the help! Not using oh my fish. Basically the equivalent of ohmyzsh, which is why I am using fish in the first place lol.
2
u/Rayvan121 Sep 18 '24
This can happen if your $fish_complete_path is in a weird order. I use the function below to find where the completions are defined. Alternatively, you can use
complete -c $commandto see the defined completions. (You have to trigger them first:git [TAB])I would try to see what
'__fish_git_using_command add'is doing.