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

Re: On "the usual behaviour" of empty array elements

On Sat, 07 Jul 2012 10:37:22 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> A fairly recent addition to the doc for the (s::) parameter flag is this:
>      For historical reasons, the usual behaviour that empty array
>      elements are retained inside double quotes is disabled for arrays
>      generated by splitting
> The thing is, I can't find anywhere else that "the usual behavior" of
> empty array elements is even mentioned.
> Far more interesting than the retention of empty array elements in double
> quotes, I think, is that empty array elements are NOT retained when the
> array parameter reference is NOT in quotes.
> Is there something I just haven't spotted?  I confess
> I merely searched the doc rather than re-read it cover to cover.

I should have replied to this...

I don't think I've ever searched, so it's quite possible it's just something
"everyone knows", except when they don't.  We should put something in
the parameter expansion section in any case.

Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

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