On 5/30/12 12:14 PM, Bill Gradwohl wrote: > Admittedly, bash doesn't go out of its way to highlight this technique, but > it does work. > > What say you Chet? Bug or feature? There is no middle ground.
Sure, there is. It's not explicitly documented, so the behavior is undefined. You can read the documentation of indirect expansion as allowing it. > I believe we're quibbling over the officialness of the solution I provided > to the poster. Obviously bash does support a way of manipulating a foreign > array. I'd like it to be more obvious with something like a nameref as you > suggest, but it's not there. I'm not going to go out of my way to make it stop working, and I can't see it not working unless I do something really dramatic to the code in parameter_brace_expand_indir(). I plan to do something more straightforward along the lines of namerefs in the future, but this syntax is, as you say, useful. Chet -- ``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/