我是git的新手。每次我尝试加载git-completion.bash
时,都会收到以下错误消息
line 1: syntax error near unexpected token `newline'
-bash: git-completion.bash: line 1: `<!DOCTYPE html>'
有谁知道如何解决这个问题?
答案 0 :(得分:8)
您不小心从GitHub(https://github.com/git/git/blob/master/contrib/completion/git-completion.bash)而不是文件本身保存了该文件的HTML表示。 您应该保存原始文件 - https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash。