Just figured out how to get git tab completion working in zsh on a Mac. Turns out that the completion scripts use a bunch of extra git commands such as git-ls-files. These commands need to be in your path for the completion to work. If you installed git using the OS X installer, you need to add this directory to your path:
/usr/local/git/libexec/git-core
Thanks for posting, this fixed my problem. 🙂
LikeLike
Just what I was look for, great 🙂
LikeLike
Thanks a bunch! Not having completion was driving me crazy.
Since this is for Mac OS X, I thought I would pass along another tip for adding to the PATH. /usr/libexec/path_helper looks for files in /etc/paths.d and appends their contents to the PATH.
Thus to get git tab completion on my Mac:
echo “/usr/local/git/libexec/git-core” | sudo tee -a /etc/paths.d/git
LikeLike