Git completion with aliases
- by cormacrelf
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