Re: empty nameref issue

2021-12-01 Thread Chet Ramey
On 11/28/21 9:13 AM, Léa Gris wrote: > > This is ok as here: > >> # declare nameref without assigned value >> declare -n ref >> >> # use nameref as iterator >> for ref in foo bar baz >> do ref='Hello the World!' >> done >> >> declare -p foo bar baz > > although: declare -n ref > leaves the ref v

empty nameref issue

2021-11-28 Thread Léa Gris
This is ok as here: # declare nameref without assigned value declare -n ref # use nameref as iterator for ref in foo bar baz do ref='Hello the World!' done declare -p foo bar baz although: declare -n ref leaves the ref variable in a limbo state with no value $ unset -n ref; declare -n ref