On 8/30/25 12:22 PM, Zachary Santer wrote:
On Sat, Aug 30, 2025 at 11:41 AM Chet Ramey <[email protected]> wrote:It occurs to me that bash should print a warning when you attempt something like this: declare -n foo=bar declare -i foo since bash disallows that now by ignoring the attempt to add the integer attributeThe manual explicitly lays this out as something you can do:
Sorry, you're right. This indeed changes the attributes on the target variable,if you're applying it to an already-declared nameref. It's trying to give thenameref variable itself the integer attribute that is the problem.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
