On 12/19/14 5:10 PM, Jonathan Hankins wrote: > I wanted to verify that this behavior is intended, as I can't find it > described in the manual. > > $ echo $BASH_VERSION > 4.3.30(1)-release > $ foo=bar > $ echo $foo > bar > $ bar=123 > $ echo $bar > 123 > $ typeset -n foo > $ echo $foo > 123 > $ echo ${!foo} # this is what I want to verify > bar > > Is using ${!foo} intended to yield the name of the var that foo references, > now that foo has been turned into a nameref? I wanted to use this > functionality in a script, but wanted to make sure it was intentional > before I rely on it.
Yes, it's intentional. I decided to break with backwards compatibility to implement the same nameref behavior as ksh93. -- ``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/