Parse error of function definition with here doc in command substitution

2022-10-16 Thread D630
Hi, In version `5.2.0(1)-rc2 (x86_64-pc-linux-gnu)` from Debian, this code ``` _=$( f1() { c <<-! ! } f2() { : } ) ``` results in ``` bash: command substitution: line 15: syntax error near unexpected token `(' b

arithmetic syntax error loop after declaration of exported integer variable

2017-03-20 Thread D630
I get an infinite error loop in B, and I suppose that's not because of my settings. # A bash$ unset -v foo; declare -i foo; foo='bar bar' bash: bar bar: syntax error in expression (error token is "bar") # B bash$ unset -v foo; foo='bar bar' declare -x -i foo [...]

process substitution not correctly parsed inside variable expansion

2017-03-17 Thread D630
There is a parse error in B: # A bash$ p=; : "${p:=>(f()(echo "$@") ;f foo)}"; declare -p p declare -- p=">(f()(echo ) ;f foo)" bash$ p=; : ${p:=>(f()(echo "$@") ;f foo)}; declare -p p declare -- p="/dev/fd/63" foo bash$ p=; echo "${p:=>(f()(echo "$@") ;f foo)}" (f()(echo ) ;f foo) # B ba