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

Re: [PATCH] Documentation on (A) Create array parameter

On Wed, Feb 22, 2017, at 11:58 AM, Bart Schaefer wrote:
> On Feb 22,  3:40am, Sebastian Gniazdowski wrote:
> }
> } (A) completion and documentation suggest straight creation:
> There's no such thing as "straight creation" of a parameter; the whole
> shell model depends on dynamic scoping.  Assignments *always* apply to
> any parameter that is already in scope, the only way to change that is 
> by declaring the parameter with typeset/local/etc.

It's that if I have a new scope, and write "local param", I would say I
straight-create it. It will have the "oldpm" field set internally but
it's all like straight creation. If the scope is new. So I could expect
(A) will behave the same way. Use my current scope and create.

> scoping is something for a much larger context.  Would it have led you
> astray if instead the paragraph said "Assign as an array parameter ..." ?

No that's fine.

Sebastian Gniazdowski

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