From: Florian Baumann Date: Mon, 22 Nov 2010 10:44:28 +0000 (+0100) Subject: fixed debian dirty prompt bug X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=8c6197717a9ed9e318951bcae37cfe522491c3db;p=common%2Fbash_it.git fixed debian dirty prompt bug --- diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 9ae5d0e..e77d1d2 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -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 +}