On Tuesday 15 February 2011 10:40:31 weakish wrote:
> According to man dash:
> 
> 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.
> 
> Why does dash implement this feature?  I guess sinec local is not specified
> by POSIX, there isn't any history issues here.

Why do you consider it a bug? policy specifically says:
>         * `local' to create a scoped variable must be supported, including
>           listing multiple variables in a single local command and
>           assigning a value to a variable at the same time as localizing
>           it.  `local' may or may not preserve the variable value from an
>           outer scope if no assignment is present.

It's simply an unspecified behaviour, just initialize it to the empty value. 
E.g. local x=

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to