1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-13 01:31:18 +02:00
zsh/Functions/VCS_Info/VCS_INFO_reposub
2013-11-29 12:32:36 -08:00

13 lines
304 B
Bash

## vim:ft=zsh
## Written by Frank Terbeck <ft@bewatermyfriend.org>
## Distributed under the same BSD-ish license as zsh itself.
setopt localoptions extendedglob NO_shwordsplit
local base=${1%%/##}
[[ $(pwd -P) == ${base}/* ]] || {
printf '.'
return 1
}
printf '%s' ${$(pwd -P)#$base/}
return 0