Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH]: Revamped (P) expansion flag
- X-seq: zsh-workers 27575
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH]: Revamped (P) expansion flag
- Date: Wed, 06 Jan 2010 07:23:05 -0800
- In-reply-to: <22a0ef081001051452g4066b985nef6ac1e9a60e4de9@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <22a0ef080912261448x3d14b301yc4082a924cd760d8@xxxxxxxxxxxxxx> <20100105172012.3f1d628c@news01> <22a0ef081001051452g4066b985nef6ac1e9a60e4de9@xxxxxxxxxxxxxx>
On Jan 5, 5:52pm, Michael Hwang wrote:
} Subject: Re: [PATCH]: Revamped (P) expansion flag
}
} > As ${(P)REF} is really ${(P)${REF}}, one would think that that
} > ${(P)REF[1,3]} would be expanded as ${(P)${REF}[1,3]}. But as you can
} > see, it is instead expanded as ${(P)${REF[1,3]}}.
}
} I believe that the behavior that test relies on should be considered a
} bug. What do you think?
I think you haven't read manual section 14.3.2 (subsection "Rules" under
"Parameter Expansion"). The only value manipulations that are applied
before the subscripts are computed are those that are properties of the
parameter itself, such as internal padding and capitalization.
To change this for any one expansion-time flag such as (P) would be a
serious departure from long-standing semantics. It's not a bug.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author