Improved subversion support for powerline

SVN prompt also when in subdirectories that don't contain .svn
Show correct SVN status for powerline
This commit is contained in:
Martin Ankerl
2019-06-24 11:02:15 +02:00
parent 838aeabd02
commit e42405705a
2 changed files with 3 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ function scm {
elif [[ -d .hg ]] && which hg &> /dev/null; then SCM=$SCM_HG
elif which hg &> /dev/null && [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$SCM_HG
elif [[ -d .svn ]] && which svn &> /dev/null; then SCM=$SCM_SVN
elif which svn &> /dev/null && [[ -n "$(svn info --show-item wc-root 2>/dev/null)" ]]; then SCM=$SCM_SVN
else SCM=$SCM_NONE
fi
}