Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have ML with Xcode installed tools (git coming from there).

Later I've installed brew and install bash-completion, but git commands still not auto-completed.

Brew has no such package. Google does not helped. How I can enable git completion support in Mountain Lion?

share|improve this question
    
Answers containing just links will automatically be converted to comments. The way it's now is fine. Cheers! –  slhck Sep 18 '12 at 9:50
    
questions like these really belong on ask different, the apple stack exchange site, at apple.stackexchange.com –  InfluenceJamie Sep 18 '12 at 11:08
add comment

1 Answer

SOLVED:

I've found solution here http://apple.stackexchange.com/questions/55875/how-can-i-get-git-to-autocomplete-e-g-branches-at-the-command-line and it works well.

I got that by using curl from the url here:

curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o /.git-completion.bash

No need to worry about location, it is set to go to home using ~ with the target.

Then I added to my ~/.bash_profile file the following 'execute if it exists' code:

if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi

share|improve this answer
    
+1 - Don't reply to this comment, I will delete it but that is a good answer! –  Dave Rook Sep 18 '12 at 9:41
1  
That should be -o ~/.git-completion.bash instead of -o /.git-completion.bash –  obvio171 Nov 16 '12 at 16:46
    
Also, there needs to be a ; before the fi –  SooDesuNe Mar 14 '13 at 20:23
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.