Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Bug#613556: Why dash's local variable inherits its value from outter env?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Raphael Geissert  
View profile  
 More options Feb 15 2011, 2:50 pm
Newsgroups: linux.debian.bugs.dist
From: Raphael Geissert <geiss...@debian.org>
Date: Tue, 15 Feb 2011 20:50:02 +0100
Local: Tues, Feb 15 2011 2:50 pm
Subject: Bug#613556: Why dash's local variable inherits its value from outter env?
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 debian-bugs-dist-REQU...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.