Closed juanpabloaj closed 12 years ago
I assume you meant "when I cd into dir repository". I can not reproduce this. What version of bash and git you are using? (run bash --version, git --version). Do you have this error in other repos with untracked files?
$ bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
Copyright (C) 2007 Free Software Foundation, Inc.
$ git --version
git version 1.7.5
$ git clone git://git.debian.org/git/bash-completion/bash-completion.git
$ cd bash-completion/
-bash: eval: line 65: syntax error in conditional expression
-bash: eval: line 65: syntax error near `untracked_files[${#untracked_files[@]}]=""test/"'
-bash: eval: line 65: ` [[ " ${untracked_files[*]} ${modified_files[*]} ${added_files[*]} " =~ " "test/ " ]] || untracked_files[${#untracked_files[@]}]=""test/"'
I update bash
$ bash --version
GNU bash, versión 4.2.10(2)-release (i386-apple-darwin10.7.0)
And I get the same output
$ cd bash-completion/
-bash: eval: line 65: syntax error in conditional expression
-bash: eval: line 65: syntax error near `untracked_files[${#untracked_files[@]}]=""test/"'
-bash: eval: line 65: ` [[ " ${untracked_files[*]} ${modified_files[*]} ${added_files[*]} " =~ " "test/ " ]] || untracked_files[${#untracked_files[@]}]=""test/"'
I was able to reproduce this error after doing:
mkdir '"test' # note double quote touch '"test/uuu'
Do you have test directory with leading double-quote?
@lvv see this
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# "test/fixtures/_filedir/ae\314\201/"
and this
bash-completion/test/fixtures/_filedir$ ls
a b a"b a$b a&b a'b ab ae?? ext
This is real bug. Git-prompt can not handle files with quotes. I'll think how to fix this.
a599ae8 -- fixed: filesnames with spaces, quotes and other special chars
I have cloned the bash-completion repository.
when I move the dir repository I get