Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: nested ${(P)} (formerly SHWORDSPLIT and leading spaces)
> but ${${(Pr.5.)name}} works.
It doesn't say 'bad substitution' but doesn't work as expected.
% array=(a b)
% arra=xxx
% name=array
% echo ${${(Pr.6.)name}}
zsh: bad substitution
% echo ${${(Pr.5.)name}}
a b
% echo ${${(Pr.4.)name}}
xxx
% echo ${(r.5.)${(P)name}}X
a X b X
It seems ${${(Pr.n.)name}} is behaving like ${(P)${(r.n.)name}}.
Instead, the expected behavior may be ${(r.n.)${(P)name}}.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author