bug-bash
[Top][All Lists]
Advanced

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

Re: nameref and referenced variable scope, setting other attributes (was


From: Chet Ramey
Subject: Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope)
Date: Tue, 19 Mar 2024 14:24:34 -0400
User-agent: Mozilla Thunderbird

On 3/19/24 11:50 AM, Mike Jonkmans wrote:

Yes. There is one thing missing: the transformation should expand to a
`declare' command when applied to a local variable at the current scope,
even if there are no attributes to be displayed. Agreed?

I am less convinced about outputting a `-g' for a global variable when
called from a function scope, but I could be persuaded.

This would be logical.
Forgot the use case, but it was about a year ago that I needed this.

The former, the latter, or both?

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




reply via email to

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