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?