diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2013-11-29 12:32:36 -0800 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2013-11-29 12:32:36 -0800 |
| commit | 9972fdeead12204192cd40e4331ff8f89434df04 (patch) | |
| tree | 07e08420bcec63f06a06e226453df11b950d68a9 /Functions/VCS_Info/VCS_INFO_reposub | |
| parent | 32061: Fix "use of uninitialized memory" in metafy (diff) | |
| download | zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.gz zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.bz2 zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.lz zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.xz zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.zst zsh-9972fdeead12204192cd40e4331ff8f89434df04.zip | |
32066: fix %r and %S in vcs_info formats when a repository subdirectory is accessed via a symlink
31985 Clemens Hammacher and 32064 Hong Xu
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_reposub')
| -rw-r--r-- | Functions/VCS_Info/VCS_INFO_reposub | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_reposub b/Functions/VCS_Info/VCS_INFO_reposub index 0fab863f1..1c16f0e7b 100644 --- a/Functions/VCS_Info/VCS_INFO_reposub +++ b/Functions/VCS_Info/VCS_INFO_reposub @@ -5,9 +5,9 @@ setopt localoptions extendedglob NO_shwordsplit local base=${1%%/##} -[[ ${PWD} == ${base}/* ]] || { +[[ $(pwd -P) == ${base}/* ]] || { printf '.' return 1 } -printf '%s' ${PWD#$base/} +printf '%s' ${$(pwd -P)#$base/} return 0 |
