summaryrefslogtreecommitdiff
path: root/functions/vcs.zsh
diff options
context:
space:
mode:
authorChristian Rebischke <Chris.Rebischke@posteo.de>2016-08-26 00:13:15 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-08-31 03:41:51 +0300
commit62e41ada1fe6db11cd08e6fee73532aa5af50254 (patch)
tree8e48c467bd3d9bbf2cb286a72fb2bf86c81d9613 /functions/vcs.zsh
parent55f061c04d469805faafadb85f18e9eb1cf0eb3f (diff)
added vi-svn-detect-changes() in functions/vcs.zsh
Diffstat (limited to 'functions/vcs.zsh')
-rw-r--r--functions/vcs.zsh14
1 files changed, 14 insertions, 0 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index 657a0f3f..66c6a0d2 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -113,6 +113,8 @@ function +vi-vcs-detect-changes() {
vcs_visual_identifier='VCS_GIT_ICON'
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON'
+# elif [[ "${hook_com[vcs]}" == "svn" ]]; then
+# vcs_visual_identifier='VCS_SVN_ICON'
fi
if [[ -n "${hook_com[staged]}" ]] || [[ -n "${hook_com[unstaged]}" ]]; then
@@ -121,3 +123,15 @@ function +vi-vcs-detect-changes() {
VCS_WORKDIR_DIRTY=false
fi
}
+
+function +vi-svn-detect-changes() {
+ local svn_status=$(svn status)
+ if [[ -n "$(echo "$svn_status" | grep \^\?)" ]]; then
+ VCS_WORKDIR_DIRTY=true
+ elif [[ -n "$(echo "$svn_status" | grep \^\A)" ]]; then
+ VCS_WORKDIR_HALF_DIRTY=true
+ else
+ VCS_WORKDIR_DIRTY=false
+ VCS_WORKDIR_HALF_DIRTY=false
+ fi
+}