Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Parameter expansion/substitution rules



Bart Schaefer wrote:

> The new section on expansion rules should mention when the (e) and (P)
> flags kick in.  I considered producing a patch for this but then decided
> I wasn't sure I would get it right.  (e) happens after rule 6, and then
> padding from the (l) and (r) flags is inserted last of all; but I'm not
> sure when (P) happens, or what happens with (eP) both given at once.

(P) is used very early, after subscripting, before other
modifications. The fact that subscripting is done on the value of the
original parameter is slightly irritating, but one can always use
`${(P)${foo}[1]}' to make the subscript apply to the value of the
parameter that is finally used.
With (eP), the (e) is still aplied at the end, as always (i.e. there
is no special treatment for the combination).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author