Re: alias g to git in .gitconfig?
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Oct 3, 2008, 03:10 UTC
- Message-ID
- <20081003031014.GA24367@spearce.org>
- In-Reply-To
- <fc113d400810021951hf95ff35qb1ccb4af45a71abe@mail.gmail.com>
Rob Sanheim <rsanheim@gmail.com> wrote:
Show 5 quoted lines
> This is pretty trivial, but I'm a lazy typist. > > Is it possible to alias 'g' to git via git config, instead of via > bash? If I do a plain bash alias then none of the nice autocompletion > from git-contrib work with 'g'.
No, you'll need to alias 'g' to git in bash, and then if you still want completion you'll need to also register the compgen to call _git completion routine. Its two lines:
alias g=git complete -o default -o nospace -F _git g
-- Shawn.