Re: alias g to git in .gitconfig?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob Sanheim <rsanheim@xxxxxxxxx> wrote:
> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux