Re: temp env vs export

2023-06-27 Thread Chet Ramey
On 6/22/23 1:54 PM, Grisha Levit wrote: Using `export' / `readonly' on a variable that's present in both the temp env and a calling function's local context combines the attributes of all the intervening scopes in the global variable: H. Should it even get to this point? Temporary assignmen

temp env vs export

2023-06-22 Thread Grisha Levit
Using `export' / `readonly' on a variable that's present in both the temp env and a calling function's local context combines the attributes of all the intervening scopes in the global variable: $ declare -A v; f() { local -a v; v= e; }; e() { export v; } $ (f; declare -p v) declare -aAx v=([0]=""