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

Re: [PATCH]: Revamped (P) expansion flag



On Tue, Jan 5, 2010 at 12:20 PM, Peter Stephenson <pws@xxxxxxx> wrote:
> With the two patches I know about (the second a single line), the test
> suite now fails at this test in D06subscript.ztst:

On Sat, Dec 26, 2009 at 5:48 PM, Michael Hwang
<michael.a.hwang@xxxxxxxxx> wrote:
> On the more buggy-ish side:
>
> % STRING='zsh is awesome!'
> % STR='zsh sucks... :-/'
> % REF=STRING
> % print ${(P)REF[1,3]}
> zsh sucks... :-/
>
> 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?

Michael Hwang



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