How to setup bash completion for alias of git command
- From
Ping Yin <pkufranky@gmail.com>
- Date
- Jan 12, 2013, 14:30 UTC
- Message-ID
- <CACSwcnQu8Rx83mcGYR6NGzEhoreNR6DfiK876LF7pa9PGm30JA@mail.gmail.com>
Following setup works for me in ubuntu (10.04,11.04) for a long time
alias gtlg='git log' complete -o default -o nospace -F _git_log gtlg
However, in debian (testing, wheezy), it doesn't work
$ gtlg or<TAB> gtlg or-bash: [: 1: unary operator expected -bash: [: 1: unary operator expected
$ git --version git version 1.7.10
Can anybody help?