mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-13 13:41:01 +02:00
35326: $#- was misparsed as ${#-}
This commit is contained in:
parent
d9243734e1
commit
e88610b786
3 changed files with 11 additions and 3 deletions
|
@ -1,7 +1,10 @@
|
||||||
2015-05-29 Peter Stephenson <p.stephenson@samsung.com>
|
2015-05-29 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 20237: Src/Modules/parameter.c: $functions[foo] shouldn't be
|
* 35326: Src/subst.c, Test/D04parameter.ztst: $#- was misparsed
|
||||||
unmetafied when passed as parameter body.
|
as ${#-}.
|
||||||
|
|
||||||
|
* users/20237: Src/Modules/parameter.c: $functions[foo]
|
||||||
|
shouldn't be unmetafied when passed as parameter body.
|
||||||
|
|
||||||
2015-05-28 Daniel Hahler <zsh@thequod.de>
|
2015-05-28 Daniel Hahler <zsh@thequod.de>
|
||||||
|
|
||||||
|
|
|
@ -2170,7 +2170,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
|
||||||
*/
|
*/
|
||||||
|| ((cc == '#' || cc == Pound) &&
|
|| ((cc == '#' || cc == Pound) &&
|
||||||
s[2] == Outbrace)
|
s[2] == Outbrace)
|
||||||
|| cc == '-' || (cc == ':' && s[2] == '-')
|
|| (inbrace && (cc == '-' || (cc == ':' && s[2] == '-')))
|
||||||
|| (isstring(cc) && (s[2] == Inbrace || s[2] == Inpar)))) {
|
|| (isstring(cc) && (s[2] == Inbrace || s[2] == Inpar)))) {
|
||||||
getlen = 1 + whichlen, s++;
|
getlen = 1 + whichlen, s++;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1703,3 +1703,8 @@
|
||||||
funnychars='The qu*nk br!wan f@x j/mps o[]r \(e la~# ^"&;'
|
funnychars='The qu*nk br!wan f@x j/mps o[]r \(e la~# ^"&;'
|
||||||
[[ $funnychars = ${~${(b)funnychars}} ]]
|
[[ $funnychars = ${~${(b)funnychars}} ]]
|
||||||
0:${(b)...} quoting protects from GLOB_SUBST
|
0:${(b)...} quoting protects from GLOB_SUBST
|
||||||
|
|
||||||
|
set --
|
||||||
|
print $#-1
|
||||||
|
0:Avoid confusion after overloaded characters in braceless substitution
|
||||||
|
>0-1
|
||||||
|
|
Loading…
Reference in a new issue