diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2014-09-29 17:52:33 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-09-29 17:52:33 -0700 |
commit | 32473f59a38631c4bb2403d835b9e007c8a0ddc7 (patch) | |
tree | 72df8959fcde37e5968a6c6301f8a98a9f860e5f /Functions | |
parent | 60e31a45b0c015d42e9dc8ca2c991930c3f7fd66 (diff) | |
parent | 8cb67e721b3f02779bf4cf0d6a368f67c49c11f8 (diff) | |
download | zsh-32473f59a38631c4bb2403d835b9e007c8a0ddc7.tar.gz zsh-32473f59a38631c4bb2403d835b9e007c8a0ddc7.tar.xz zsh-32473f59a38631c4bb2403d835b9e007c8a0ddc7.zip |
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Conflicts: ChangeLog
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/VCS_Info/VCS_INFO_reposub | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_reposub b/Functions/VCS_Info/VCS_INFO_reposub index 1c16f0e7b..8ebc90b6e 100644 --- a/Functions/VCS_Info/VCS_INFO_reposub +++ b/Functions/VCS_Info/VCS_INFO_reposub @@ -3,11 +3,12 @@ ## Distributed under the same BSD-ish license as zsh itself. setopt localoptions extendedglob NO_shwordsplit -local base=${1%%/##} +local base=${1%%/##} tmp -[[ $(pwd -P) == ${base}/* ]] || { +tmp="$(pwd -P)" +[[ $tmp == ${base}/* ]] || { printf '.' return 1 } -printf '%s' ${$(pwd -P)#$base/} +printf '%s' ${tmp#$base/} return 0 |