No matter what I try and do I can't seem to make git tab/auto completion work in my zsh shell. I've downloaded the bash-completion script and the zsh-completion one and followed the instructions, but I can't make it work.
I've reinstalled oh-my-zsh but that didn't seem to help or make any difference.
Can anyone who's got it working describe to me their setup so I can try an emulate it to get it working for me?
To be specific, what I've done so far is:
- Switched to using zsh as my default shell
- Installed oh-my-zsh
- Downloaded https://github.com/git/git/blob/master/contrib/completion/git-completion.bash and saved it in
~/.completion/git/git-completion.sh
- Downloaded https://github.com/git/git/blob/master/contrib/completion/git-completion.zsh and saved that in
~/.zsh/_git
- Added
zstyle ':completion:*:*:git:*' script ~/.completion/git/git-completion.sh
No luck.
git
to theplugins
list? – Emancipationfpath=(~/.zsh $fpath)
is somewhere in your config (possibly provided by Oh My Zsh)? – Emancipationoh-my-zsh.sh
I havefpath=($ZSH/functions $ZSH/completions $fpath)
andfor plugin ($plugins); do if is_plugin $ZSH_CUSTOM $plugin; then fpath=($ZSH_CUSTOM/plugins/$plugin $fpath) elif is_plugin $ZSH $plugin; then fpath=($ZSH/plugins/$plugin $fpath) fi done
– Blackthorn