I have looked at different questions regarding this issue and none seem identical to mine: new git installation on Mac 10.10.2
I have used the below to install auto-completion:
curl -OL https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
I have also tried the above with: -O
.
I have added a .
to the file that was downloaded:
mv ~/git-completion.bash ~/.git-completion.bash
Then I edit my bash_profile
and inserted the line to get an auto load when terminal loads:
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
Up on restarting terminal:
Users/user/.git-completion.bash: line 4: syntax error near unexpected token `newline'
Is there an issue with the file that was download or my OS?
curl -OL https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
this is not real '.bash' file. (looks like website html file)
if you want to git-completion.bash file,
connect site "https://github.com/git/git"
and
click on the "Download ZIP" button
thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With