X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/fd9312417d57c0c41e23395bece4be00c94dc8df..f7bd94a586d968583bc05c1cd1ea253c05054f77:/.zsh/zshrc/85_vcs_prompt diff --git a/.zsh/zshrc/85_vcs_prompt b/.zsh/zshrc/85_vcs_prompt index d992511..e0fbbd0 100644 --- a/.zsh/zshrc/85_vcs_prompt +++ b/.zsh/zshrc/85_vcs_prompt @@ -57,6 +57,7 @@ __vcs_get_repo_type() [ -d .bzr ] && echo bzr && break [ -d .hg ] && echo hg && break [ -d .svn ] && echo svn && break + [ -d .svk ] && echo svk && break [ -d CVS ] && echo cvs && break [ "$PWD" = / ] && echo NONE && return 1 cd .. @@ -67,8 +68,9 @@ __vcs_set_prompt_variables() { local pre branch post local MAXLEN=25 + local repotype="${1:-$(__vcs_get_repo_type)}" - case "${1:-$(__vcs_get_repo_type)}" in + case "$repotype" in git) local reporoot="$(__git_get_repo_root)" set -- $(__get_prompt_path_components "$reporoot") @@ -80,6 +82,10 @@ __vcs_set_prompt_variables() pre="${(%)pre}" ;; *) + case "$repotype" in + NONE) :;; + *) warn "$repotype repositories not (yet) supported in the prompt";; + esac local p="%${MAXLEN}<..<%~%<<" #TODO find a better way so we don't have to nuke $psvar, but since the # %(nv.true.false) check for prompts checks element count, not