added vi-svn-detect-changes() in functions/vcs.zsh

pull/22/head
Christian Rebischke 8 years ago committed by Ben Hilburn
parent 55f061c04d
commit 62e41ada1f

@ -113,6 +113,8 @@ function +vi-vcs-detect-changes() {
vcs_visual_identifier='VCS_GIT_ICON' vcs_visual_identifier='VCS_GIT_ICON'
elif [[ "${hook_com[vcs]}" == "hg" ]]; then elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON' vcs_visual_identifier='VCS_HG_ICON'
# elif [[ "${hook_com[vcs]}" == "svn" ]]; then
# vcs_visual_identifier='VCS_SVN_ICON'
fi fi
if [[ -n "${hook_com[staged]}" ]] || [[ -n "${hook_com[unstaged]}" ]]; then if [[ -n "${hook_com[staged]}" ]] || [[ -n "${hook_com[unstaged]}" ]]; then
@ -121,3 +123,15 @@ function +vi-vcs-detect-changes() {
VCS_WORKDIR_DIRTY=false VCS_WORKDIR_DIRTY=false
fi 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
}

Loading…
Cancel
Save