diff options
Diffstat (limited to 'zshfunc/vcs-info/VCS_INFO_reposub')
-rw-r--r-- | zshfunc/vcs-info/VCS_INFO_reposub | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zshfunc/vcs-info/VCS_INFO_reposub b/zshfunc/vcs-info/VCS_INFO_reposub new file mode 100644 index 0000000..0eb81d4 --- /dev/null +++ b/zshfunc/vcs-info/VCS_INFO_reposub @@ -0,0 +1,11 @@ +VCS_INFO_reposub () { #{{{ + setopt localoptions extendedglob + local base=${1%%/##} + + [[ ${PWD} == ${base}/* ]] || { + printf '.' + return 1 + } + printf '%s' ${PWD#$base/} + return 0 +} |