summaryrefslogtreecommitdiff
path: root/functions/vcs.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/vcs.zsh')
-rw-r--r--functions/vcs.zsh18
1 files changed, 18 insertions, 0 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index 657a0f3f..9418df81 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,19 @@ 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
+ hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')"
+ VCS_WORKDIR_HALF_DIRTY=true
+ fi
+ if [[ -n "$(echo "$svn_status" | grep \^\M)" ]]; then
+ hook_com[unstaged]+=" $(print_icon 'VCS_UNSTAGED_ICON')"
+ VCS_WORKDIR_DIRTY=true
+ fi
+ if [[ -n "$(echo "$svn_status" | grep \^\A)" ]]; then
+ hook_com[staged]+=" $(print_icon 'VCS_STAGED_ICON')"
+ VCS_WORKDIR_DIRTY=true
+ fi
+}