Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a convenient dotfiles repo on Github for you all to look at, here. FYI, git is installed via Homebrew, as with most of the executables on my system.

My git-completion in zsh works fine when I use no aliases, such as:

% git add fi<TAB> # => file.rb

But if I add an alias in my .zshrc (actually cormacrelf-dotfiles-repo/zsh/aliases.zsh), like:

alias ga="git add"
compdef _git ga=git-add

... trying to complete anything (not just files: branches, etc.) results in an error:

% git add fi
_git:19: parse error: condition expected: 1
share|improve this question
Did you try "git add fi<tab>' or 'ga <tab>'. Question sounds confusing. – Cougar May 28 '12 at 8:06
up vote 7 down vote accepted

setopt no_complete_aliases in your .zshrc. Yes I know, the name sounds wrong, but that works.

share|improve this answer
Legend! This seems to work for me. – cormacrelf Jul 6 '12 at 11:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.