1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-30 11:56:04 +02:00

33277: Fix VCS_INFO_reposub's command expansion

Reported-by: Marco Hinz <mh.codebro@gmail.com>
This commit is contained in:
Frank Terbeck 2014-09-29 14:23:28 +02:00
parent f2aaea5cd3
commit 4a529201b8
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2014-09-29 Frank Terbeck <ft@bewatermyfriend.org>
* 33277: Functions/VCS_Info/VCS_INFO_reposub: Fix
VCS_INFO_reposub's command expansion
2014-09-29 Peter Stephenson <p.stephenson@samsung.com>
* users/19183: Src/hist.c: handle unlikely error case with

View File

@ -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