Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autocomplete git in mac OS not working?

I am using git in mac. I am trying to have the autocomplete feature. I followed these steps (http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/) but I get this error, any idea?

: command not found -bash: /Users/me/git-completion.bash: line 80: syntax error near unex'ected token in -bash: /Users/me/git-completion.bash: line 80:case "$COMP_WORDBREAK'" in

like image 446
Julio Avatar asked Dec 31 '10 10:12

Julio


People also ask

What is git auto completion?

What auto-complete does, it'll help you to type commands, file paths, branch names, other things like that in Git. Essentially, you start typing a word, then you hit the tab key and Git then tries to guess based on the context what the rest of the command, the file path, or the branch name ought to be.


1 Answers

I had tried to use curl -O but the url was wrong and I ended up copying the text which caused the error.

Using this command made it work perfectly:

curl -O https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash

Thanks a lot everyone for your help!

like image 91
Julio Avatar answered Sep 19 '22 06:09

Julio