Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Autocompletion looks weird (and only half-functional)

Following these excellent instructions for enabling Git bash autocompletion in OSX:

curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
echo "source ~/.git-completion.bash" >> ~/.bash_profile

I get the following output when I type "git TabTab" at the command line:

Output from git tab-tab

Following multiple different tutorials produces the same result. Either I don't know the right search terms or there is just very little documented about this issue...

Anyone encountered similar issues implementing git autocompletion for OSX? Running Lion if that's important.

like image 727
user456584 Avatar asked Jul 20 '12 00:07

user456584


2 Answers

I have the same problem. Using export GREP_OPTIONS='--color=auto instead of export GREP_OPTIONS='--color=always' could resolve this problem.

like image 195
siyuan Avatar answered Oct 22 '22 20:10

siyuan


Turns out this is a simple fix. I simply removed the following line from my ~/.bashrc file (as per this post):

export GREP_OPTIONS='--color=always'

...and now it works like a charm :)

like image 42
user456584 Avatar answered Oct 22 '22 21:10

user456584