On 2/20/20 6:23 PM, Arfrever Frehtes Taifersar Arahesis wrote:
> Even more strangely, quoting apparently matters... Yes, this is a bug: > $ echo "${VAR1[@]@A}" > declare -rl VAR1='' >> The question is whether the unset variables should display commands to >> set the attributes (@A) or display any attributes (@a). > > I think that it would be expected that @A prints the same as 'declare > -p' for given variable. That's not unreasonable, but it takes some consideration. You have to be careful separating out these cases from the usual case, where a variable name in a brace expansion is expanded to nothing if it's unset. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/