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

Re: no-fork expansion with array var



On Fri, Sep 22, 2023, 4:00 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
The documentation says:
  If param names an array, array expansion rules apply.

But what it means is if you do an array assignment to var inside the
code block, array expansion rules apply

There are two cases:  The parameter has already been declared an array, or it's made an array by assignment within the _expression_.  I was trying to cover both, but rephrasing welcome.

Or we should at
least document that the special name REPLY is always expanded as a
scalar

Oops, I thought I'd mentioned that.  It was certainly implied by the descriptions of mksh behavior.  Anyway that is how it works.


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