Re: A few suggestions for the GNU Manual

2023-08-01 Thread Chet Ramey
On 7/31/23 12:59 PM, Wiley Young wrote: Hi, Regarding the "Invoking Bash" page, https://www.gnu.org/software/bash/manual/html_node/Invoking-Bash.html Thanks for the report. It might be more consistent and therefore perhaps more clear for all of the newbies out there if the description of "-

[PATCH] declare -g compound assignment with associative array

2023-08-01 Thread Grisha Levit
If `declare -g' is supplied with a compound assignment when referring to an existing global associative array, it attempts to convert the global variable to an indexed array. $ declare -A A=(x x) $ f() { declare -g A=([1]=1); } $ (f) bash: '1': arithmetic syntax error: operand expected (error toke

Re: [PATCH v2] read: non-raw-mode fixes

2023-08-01 Thread Chet Ramey
On 7/26/23 7:53 PM, Grisha Levit wrote: On Wed, Jul 26, 2023 at 2:23 PM Grisha Levit wrote: If the last character read was an (unescaped) backslash, store it as such instead of as a CTLESC. Avoids: $ printf '\\' | { read; echo "${REPLY@Q}"; } bash: DEBUG warning: dequote_string: string with b

assoc vs array append

2023-08-01 Thread Grisha Levit
If an indexed array is set via compound assignment, its values are cleared at the start so any arithmetic expansions in the assignment that reference the array and any [ind]+= assignments are evaluated using the newly assigned values. However, when assigning associative arrays, any previously exis