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:
parent
f2aaea5cd3
commit
4a529201b8
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue