I just stumbled upon the answer!
In my case I was missing a few important pieces in my .zshrc
file. But first a little background:
What I’m trying to do is setup the “zsh Completion System”. It comes with a lot of commands all named something with comp*
. I tried to run these a few times but in many cases zsh would just tell me it didn’t know them. So aparently you have to autoload
them, among other things.
This is what I did:
I added the following lines to my .zshrc
file:
autoload -U compinit && compinit
zmodload -i zsh/complist
Then I opened a new terminal and ran:
rm -f ~/.zcompdump; compinit
Then I opened a new terminal and now git <tab>
worked as expected 🙂
If you are setting up a custom $fpath
in your .zshrc
file I would recommend adding these lines after you’ve modified the $fpath
(though I don’t know if it makes a difference).