summaryrefslogtreecommitdiff
path: root/zshfunc/vcs-info/VCS_INFO_reposub
blob: 0eb81d48983f434420aee14620e07befc7fb14be (plain)
1
2
3
4
5
6
7
8
9
10
11
VCS_INFO_reposub () { #{{{
    setopt localoptions extendedglob
    local base=${1%%/##}

    [[ ${PWD} == ${base}/* ]] || {
        printf '.'
        return 1
    }
    printf '%s' ${PWD#$base/}
    return 0
}