diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2012-07-06 20:54:33 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2012-07-06 20:54:33 +0300 |
commit | a599ae86440035ca15052b67f44238c81bf3001e (patch) | |
tree | 75a4e11f2d15ce7f5bd3a34cf7964ee0e43f4f61 | |
parent | Merge branch 'master' of github.com:lvv/git-prompt (diff) | |
download | git-prompt-a599ae86440035ca15052b67f44238c81bf3001e.tar.gz git-prompt-a599ae86440035ca15052b67f44238c81bf3001e.tar.bz2 git-prompt-a599ae86440035ca15052b67f44238c81bf3001e.zip |
fixed: filesnames with spaces, quotes and other special chars
-rwxr-xr-x | git-prompt.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 7d09948..c819227 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -444,9 +444,9 @@ parse_git_status() { eval " $( git status --porcelain 2>/dev/null | sed -n ' - s/^[MARC]. \(.*\)/ added=added; [[ \" ${added_files[*]} \" =~ \" \1 \" ]] || added_files[${#added_files[@]}]=\"\1\"/p - s/^.[MAU] \(.*\)/ modified=modified; [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p - s/^?? \(.*\)/ untracked=untracked; [[ \" ${untracked_files[*]} \" =~ \" \1 \" ]] || untracked_files[${#untracked_files[@]}]=\"\1\"/p + s/^[MARC]. \(.*\)/ added=added; [[ \" ${added_files[*]} \" =~ \1 ]] || added_files[${#added_files[@]}]=\1/p + s/^.[MAU] \(.*\)/ modified=modified; [[ \" ${modified_files[*]} \" =~ \1 ]] || modified_files[${#modified_files[@]}]=\1/p + s/^?? \(.*\)/ untracked=untracked; [[ \" ${untracked_files[*]} \" =~ \1 ]] || untracked_files[${#untracked_files[@]}]=\1/p ' )" |