lvv/git-prompt — Issue #19: quote not properly escaped
Author: orefalo
Created: 2011-11-18 03:22:08+00:00
State: open

consider the following output generated by a `git status`

#	new file: jPDF_Test_V7/src/testdocs/ReleaseNotes.15.pdf
#	new file: jPDF_Test_V7/src/testdocs/ReleaseNotes.pdf
#	new file: "jPDF_Test_V7/src/testdocs/Ringkj\302\257bing_01.pdf"

the last line will make git prompt fail

-bash: eval: line 1033: syntax error in conditional expression
-bash: eval: line 1033: syntax error near `added_files[${#added_files[@]}]=""jPDF_Test_V7/"'
-bash: eval: line 1033: `	[[ " ${added_files[*]} " =~ " "jPDF_Test_V7/ " ]] || added_files[${#added_files[@]}]=""jPDF_Test_V7/"'