[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ${param@a} should bypass unbound variable check or be processed ahea
From: |
Chet Ramey |
Subject: |
Re: ${param@a} should bypass unbound variable check or be processed ahead of it. |
Date: |
Sun, 13 Oct 2024 14:57:51 -0400 |
User-agent: |
Mozilla Thunderbird |
On 10/1/24 3:54 AM, konsolebox wrote:
# declare -A x
# echo ${x@a}
A
# set -u
# echo ${x@a}
bash: x: unbound variable
Obvious workaround would be to disable `set -u` temporarily or assign
a temporary array value but that shouldn't need to be done.
I'll consider it, but I'm not eager to carve out more exceptions for
`set -u'.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature