On 3/20/24 4:30 PM, Zachary Santer wrote:

The point I'm trying to make is that ${var@A} expanding to either a
declare command, an assignment statement, or nothing, depending on
potentially changing criteria, is unnecessarily cumbersome. In
whatever circumstances where a bash programmer would actually want a
declare statement as the expansion of ${var@A}, it doesn't suit their
purposes for that expansion to not give them that under certain
conditions.

If you want to be guaranteed a declare command for a particular name,
use `declare -p'. Parse the result of a (nofork) command substitution
if you must.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to