Mac OS中的自动完成git无法正常工作? [英] Autocomplete git in mac OS not working?

查看:112
本文介绍了Mac OS中的自动完成git无法正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac中使用git.我正在尝试具有自动完成功能.我遵循了以下步骤(http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/),但我收到此错误,知道吗?

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?

:找不到命令 -bash:/Users/me/git-completion.bash:第80行:意外的令牌附近的语法错误in -bash: /Users/me/git-completion.bash: line 80:情况为"$ COMP_WORDBREAK",

: 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

推荐答案

我曾尝试使用curl -O,但URL错误,最终我复制了导致错误的文本.

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

非常感谢大家的帮助!

这篇关于Mac OS中的自动完成git无法正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆