fixed debian dirty prompt bug
authorFlorian Baumann <flo@noqqe.de>
Mon, 22 Nov 2010 10:44:28 +0000 (11:44 +0100)
committerFlorian Baumann <flo@noqqe.de>
Mon, 22 Nov 2010 10:44:28 +0000 (11:44 +0100)
themes/base.theme.bash

index 9ae5d0e..e77d1d2 100644 (file)
@@ -50,7 +50,7 @@ function prompt_char {
 }
 
 function git_prompt_info {
-  if [[ -n $(git status -s 2> /dev/null) ]]; then
+  if [[ -n $(git status -s 2> /dev/null |grep -v ^# |grep -v "working directory clean") ]]; then
       state=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}
   else
       state=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
@@ -81,4 +81,4 @@ function rvm_version_prompt {
     rvm=$(rvm tools identifier) || return
     echo -e "$RVM_THEME_PROMPT_PREFIX$rvm$RVM_THEME_PROMPT_SUFFIX"
   fi
-}
\ No newline at end of file
+}