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: Tue, 20 Feb 2024 17:09:23 -0500
User-agent: Mozilla Thunderbird

On 2/20/24 4:11 AM, Martin D Kealey wrote:

So yes please, I'd like "local" to push a new variable definition that inherits nothing from any outer one: not name-ref, not read-only, not array (of any kind), not assignment modifiers (integer, upper-case, lower-case), and above all, not any previous values.

You're in luck.


Ideally each function invocation would have its own variable namespace, only using the global namespace as a fall-back, but that creates complications with exported variables, so let's take baby steps to get there.

That doesn't work with dynamic scoping at all.

--
``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]