Reputation: 28071
I'm using ubuntu with bash. When I typed git checkout
then press tab
, I expected it would show a list of branches, but I got:
git checkout
bash: eval: line 345: unexpected EOF while looking for matching `''
bash: eval: line 346: syntax error: unexpected end of file
I googled it but found nothing. And bash even doesn't tell me where is the line 345
. Anyone knows what's wrong?
EDIT:
When I set -x
to bash and then git checkout [tab]
, it outputs:
+++ 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 '
...and so on. No error. But I still can't use autocompletion normally.
Upvotes: 2
Views: 1359
Reputation: 554
Try set -x
in bash:
-x Print commands and their arguments as they are executed.
This should show you what code fails, as it will show what kind of work bash completion does in the background.
Upvotes: 1