From 70882666748a38cee299f512547ff1c322928a40 Mon Sep 17 00:00:00 2001 From: Arialdo Martini Date: Fri, 2 Jan 2015 23:43:20 +0100 Subject: [PATCH] fix #30 - untracked files are detected in bash --- base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.sh b/base.sh index 2d14247..9813d69 100644 --- a/base.sh +++ b/base.sh @@ -48,7 +48,7 @@ function build_prompt { if [[ $git_status =~ ($'\n'|^)[MAD] && ! $git_status =~ ($'\n'|^).[MAD\?] ]]; then ready_to_commit=true; else ready_to_commit=false; fi - number_of_untracked_files=`echo $git_status | grep -c "^??"` + number_of_untracked_files=`echo "${git_status}" | grep -c "^??"` if [[ $number_of_untracked_files -gt 0 ]]; then has_untracked_files=true; else has_untracked_files=false; fi tag_at_current_commit=$(git describe --exact-match --tags $current_commit_hash 2> /dev/null)