[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nameref and referenced variable scope, setting other attributes (was
From: |
Zachary Santer |
Subject: |
Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope) |
Date: |
Thu, 14 Mar 2024 20:57:43 -0400 |
On Thu, Mar 14, 2024 at 3:43 PM Chet Ramey <chet.ramey@case.edu> wrote:
>
> In fact, before 2020, local -p with no name arguments behaved the same as
> local without arguments, which just printed all the local variable names at
> the current scope in the form of assignment statements. That was certainly
> not usable to reproduce the current state.
While we're kind of on the subject, I find it really odd that the
${var@A} parameter expansion will expand to either an assignment
statement or a 'declare' command, depending on whether or not the
variable has an attribute set.
You'd think you'd want a parameter transformation that always expands
to a 'declare' command, and maybe another one that always expands to
an assignment statement.
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), (continued)
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Chet Ramey, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), alex xmb sw ratchev, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Robert Elz, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Chet Ramey, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Zachary Santer, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Zachary Santer, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Chet Ramey, 2024/03/14
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope),
Zachary Santer <=
- Re: nameref and referenced variable scope, setting other attributes (was "local -g" declaration references local var in enclosing scope), Chet Ramey, 2024/03/18
- ${var@A}; hypothetical, related parameter transformations, Zachary Santer, 2024/03/18
- Re: ${var@A}; hypothetical, related parameter transformations, Zachary Santer, 2024/03/18
- Re: ${var@A}; hypothetical, related parameter transformations, Zachary Santer, 2024/03/19
- Re: ${var@A}; hypothetical, related parameter transformations, Chet Ramey, 2024/03/20
- Re: ${var@A}; hypothetical, related parameter transformations, Zachary Santer, 2024/03/20
- Re: ${var@A}; hypothetical, related parameter transformations, Greg Wooledge, 2024/03/20
- Re: ${var@A}; hypothetical, related parameter transformations, alex xmb sw ratchev, 2024/03/20
- Re: ${var@A}; hypothetical, related parameter transformations, Zachary Santer, 2024/03/20
- Re: ${var@A}; hypothetical, related parameter transformations, Chet Ramey, 2024/03/21