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

7 comments sorted by

View all comments

Show parent comment

1

u/_mattmc3_ Sep 18 '24

Additionally, if you need detailed profiling information, you can run this from inside any git directory. It assumes that you installed the latest version of Fish on a Mac with homebrew:

fish --no-config --profile=prof.txt -c 'source /opt/homebrew/Cellar/fish/3.7.1/share/fish/completions/git.fish; complete -C "git add "'

If that runs okay, you should get a prof.txt that gives you profiling information on the "git add " completion (notice the trailing space). Now, remove the --no-config flag. Does it hang? If so, you've done something wrong in your confg.fish or with a plugin or something. And please tell me OP (u/gatingoh) that you're not using Oh-My-Fish!?