bug-bash
[Top][All Lists]
Advanced

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

Re: It is possible to remove the readonly attribute from {BASH, SHELL}OP


From: Chet Ramey
Subject: Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS
Date: Fri, 23 Feb 2024 10:45:01 -0500
User-agent: Mozilla Thunderbird

On 2/23/24 8:13 AM, Robert Elz wrote:

   | even when we claim it's local" and "unset can even mess with the poor
   | protection afforded by 'local'".

I'm guessing you mean bash's bizarre unset definition wrt locals.
I consider that to just be a bug.  Unsetting a 'local' variable
should be identical to unsetting a global, as that is what
actually happens (should happen).  That there is a saved copy that
will be restored later is irrelevant.

Same question:

Do you mean that unset can mark local variables at the same scope as unset,
that unset can remove local variables at a previous scope, or that unset in
a shell function can unset global variables?

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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