bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: typeset -r prevents local variable of same name.


From: Chet Ramey
Subject: Re: typeset -r prevents local variable of same name.
Date: Thu, 17 Feb 2011 21:56:10 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

On 2/17/11 12:11 PM, Eric Blake wrote:

> Consensus on today's Austin Group meeting was that since we are
> interested in standardizing local variables (or at least a subset of the
> 'typeset' special built-in's capabilities), this needs to be uniform
> across implementations.  The Austin Group would favor the ability to
> create a local read-write variable that shadows a global read-only
> variable, which would entail a change to this bash behavior.

It's interesting that the group would introduce such different scoping
behavior.  After all, the only separate "scope" the shell has currently
is the set of assignments preceding a command name, and assignments to
readonly variables there are explicitly disallowed.  I'll definitely
have to read the minutes.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]