需要帮助加载git-completion.bash文件

时间:2014-11-28 16:22:36

标签: git git-completion

我是git的新手。每次我尝试加载git-completion.bash时,都会收到以下错误消息

line 1: syntax error near unexpected token `newline'
-bash: git-completion.bash: line 1: `<!DOCTYPE html>'

有谁知道如何解决这个问题?

1 个答案:

答案 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