Re: Parse error in bash 5.2+ with CHLD trap and 2 or more $() in a command

2023-09-06 Thread Chet Ramey
On 9/5/23 7:00 PM, Emanuele Torre wrote: If you have a CHLD trap set, and you run any command that has more than one command substitution, or an array subscript with more than one command substituion in an arithmetic context, or also in a prompt string, you will get parse errors. Thanks for

Parse error in bash 5.2+ with CHLD trap and 2 or more $() in a command

2023-09-05 Thread Emanuele Torre
If you have a CHLD trap set, and you run any command that has more than one command substitution, or an array subscript with more than one command substituion in an arithmetic context, or also in a prompt string, you will get parse errors. $ ./bash -c 'trap : CHLD; let "x[\$(exit 20)0]"' $