Parse error of function definition with here doc in command substitution
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 `(' bash: command substitution: line 15: `}function f2 () ' ``` This one looks good at first: ``` _=$( f2() { : } f1() { c <<-! ! } ) ``` But this not: ``` _=$( f2() { : } f1() { c <<-! ! } f1 ) ``` This works: ``` _=$( f2() { : } f1() { c } <<-! ! f1 ) ```
process substitution not correctly parsed inside variable expansion
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 bash$ p=; : "${p:=>(f() { echo "$@"; };f foo)}"; declare -p p declare -- p=">(f() { echo ; " bash$ p=; : ${p:=>(f() { echo "$@"; };f foo)}; declare -p p bash: syntax error near unexpected token `)' bash$ p=; echo "${p:=>(f() { echo "$@"; };f foo)}" (f() { echo ; ;f foo)}
arithmetic syntax error loop after declaration of exported integer variable
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 [...]