severity 613556 wishlist
tags 613556 + upstream wontfix
quit
Hi,
weakish wrote:
> Why does dash implement this feature? I guess sinec local is not specified
> by POSIX, there isn't any history issues here.
When there's no reason to behave otherwise, dash follows the
historical dash and ash behaviors, to give existing users a smooth
upgrade path. The original ash[1] follows the behavior you
described.
When a variable is made local, it inherits the
initial value and exported and readonly flags from
the variable with the same name in the surrounding
scope, if there is one. Otherwise, the variable is
initially unset.
The Austin Group is considering[2] specifying a "typeset" keyword
somewhat like local (but lexically scoped, maybe). If you have ideas
for what that should look like, feel free to get in touch with Eric
Blake and the Austin Group[3] list.
Kind regards,
Jonathan
[1] http://groups.google.com/group/comp.sources.unix/msg/2774e7653a8e6274
[2] http://thread.gmane.org/gmane.comp.shells.zsh.devel/21342
[3] http://www.opengroup.org/austin/
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]