On 2/27/18 11:23 AM, Chet Ramey wrote:
> On 2/26/18 11:34 AM, Robert Elz wrote:
> 
>> I believe that most shells that implement local (which is most shells) 
>> implement unset of a local as meaning the local var becomes unset,
>> not that it vanishes and the global reappears.
> 
> That was the objection: that unset in a function unset the local instance
> of the variable, and left the global instance in place.

And, as a followup, allowing `unset' in a function to remove an instance
of a variable in a previous scope, even if that scope was a function and
the variable was a local variable there, while still leaving any global
instance unchanged.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to