Reputation: 151
When I say 'git checkout ' I want zsh to autocomplete names of my git branches. Is that possible?
Upvotes: 15
Views: 5590
Reputation: 33675
I got git autocomplete to work in zsh by adding this to my .zshrc
:
autoload -Uz compinit && compinit
Credit: https://stackoverflow.com/a/67627099/480608
Upvotes: 16
Reputation: 2332
The easiest way (and probably the only one not requiring a serious amount of hacking) is to update zsh. On my zsh 4.3.9
autocompletion works for git branches.
Upvotes: 2