On 4/29/16 12:50 PM, Grisha Levit wrote: > The only buggy behavior when inside of functions (ignoring scope issues) > seems to be that `declare -n ref’ unsets the value of $ref if it previously > pointed to a variable that is unset. > > |$ f() { unset var; declare -n ref=var; declare -n ref; declare -p ref; }; f > declare -n ref # why did the value of ref disappear? $ f() { local var; > declare -n ref=var; declare -n ref; declare -p ref; }; f declare -n ref="var" > |
I fixed this as part of making other changes prompted by the discussion. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/