Search code examples
bashzshtab-completiongit-completion

Unable to find a substitute command for Bash's complete in Zsh


I put the newest git-completion.bash to my .zshrc and I get

/Users/Masi/bin/shells/git/git-completion.bash:2116: command not found: complete
/Users/Masi/bin/shells/git/git-completion.bash:2118: command not found: complete

The lines are

 complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \
     || complete -o default -o nospace -F _git git 
 complete -o bashdefault -o default -o nospace -F _gitk gitk 2>/dev/null \
     || complete -o default -o nospace -F _gitk gitk

Which command is a substitute for Bash's complete in Zsh?


Solution

  • Git's completion script has been updated to work with ZSH too. The latest version should "just work".