From fd2a659805071fec2b83a19b84bcb0a98130a373 Mon Sep 17 00:00:00 2001 From: handsomecheung Date: Wed, 16 Jan 2013 11:35:53 +0800 Subject: [PATCH] add a var "ZSH_THEME_SVN_NUVC_IN_DIRTY" this var control that if the column not under version control was regarded as dirty data. --- plugins/svn/svn.plugin.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index e38e8920b..8f4ad49e5 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -24,7 +24,7 @@ function svn_get_repo_name { if [ $(in_svn) ]; then svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT - svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" + svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | read TMPP fi } @@ -46,7 +46,11 @@ function svn_get_rev_nr { function svn_dirty_choose { if [ $(in_svn) ]; then - svn status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]' + if [ $ZSH_THEME_SVN_NUVC_IN_DIRTY -eq 0 ]; then + svn status 2> /dev/null | grep -Eq '^\s*[ACDIM!L]' + else + svn status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]' + fi if [ $pipestatus[-1] -eq 0 ]; then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1