Git结帐无法使用bash自动完成

时间:2011-12-17 02:15:30

标签: git bash autocomplete

我正在使用ubuntu和bash。当我输入git checkout然后按tab时,我预计它会显示一个分支列表,但我得到了:

git checkout
bash: eval: line 345: unexpected EOF while looking for matching `''
bash: eval: line 346: syntax error: unexpected end of file
我用谷歌搜索但没有发现任何东西。而bash甚至没有告诉我line 345在哪里。谁知道什么是错的?

修改

当我set -x打击然后git checkout [tab]时,它会输出:

+++ case "$c$2" in
+++ printf '%s
' 'feature/capybara '
+++ for c in '$1'
+++ case "$c$2" in
+++ printf '%s
' 'feature/chinese-search '
+++ for c in '$1'
+++ case "$c$2" in
+++ printf '%s
' 'feature/comment_validation '
+++ for c in '$1'
+++ case "$c$2" in
+++ printf '%s
' 'feature/comments '

......等等。没错。但我仍然无法正常使用自动完成功能。

1 个答案:

答案 0 :(得分:1)

在bash中尝试set -x

-x   Print commands and their arguments as they are executed.

这应该显示哪些代码失败,因为它将显示bash完成在后台完成的工作类型。

相关问题