Nov 212008
 

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:

  3 Responses to “git completion in zsh”

  1. Thanks for posting, this fixed my problem. :)

  2. Just what I was look for, great :)

  3. 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

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">