On 10/15/25 12:19 PM, Grisha Levit wrote:
While a compound assignment to a dangling nameref removes the nameref attribute:$ f() { local -n x; x=(); local -p; }; f bash: warning: x: removing nameref attribute declare -a x=() the same does not happen when using `local' to perform compound assignment or to set the array or assoc attribute on a dangling nameref:
Thanks for the report. I don't get the segmentation fault, but converting
an unset nameref into an array or an assoc variable should definitely
remove the nameref attribute.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
