Git completion with aliases
Posted
by
cormacrelf
on Super User
See other posts from Super User
or by cormacrelf
Published on 2012-04-22T05:29:54Z
Indexed on
2012/07/06
3:18 UTC
Read the original article
Hit count: 266
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
© Super User or respective owner