Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when hitting Tab? Like other CLI commands do.

P.S. I'm using Arch Linux, if that anyhow matters.

share|improve this question
    
What shell are you using? Bash? –  nsg Aug 13 '12 at 9:13
    
Yes, Bash. Sorry for not mentioning that. –  daGrevis Aug 13 '12 at 9:29
    
You have this file /etc/bash_completion.d/git or not, it belongs to core/git –  warl0ck Aug 13 '12 at 11:37
add comment

1 Answer

up vote 7 down vote accepted

Add source /usr/share/git/completion/git-completion.bash to your ~/.bashrc.

References

  1. Arch Linux Wiki
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.