lastpipe doesn't lastpipe when stdin (fd 0) is closed

2020-12-16 Thread Tomas Janousek
Hi, bash-5.1 (and judging from git blame, all versions that ever supported lastpipe, so 4.2+) fails to honor lastpipe when run without fd 0: $ bash -O lastpipe -c 'echo x | read x; echo x=$x' x=x $ bash -O lastpipe -c 'echo x | read x; echo x=$x' <&- x= $ bash -O lastpipe

Re: No expansions performed while declaring an associative array using a list of keys and values

2020-12-16 Thread Chet Ramey
On 12/16/20 10:58 AM, Glenn Jackman wrote: On 2020-12-15 16:58, Chet Ramey wrote: On 12/15/20 11:23 AM, Glenn Jackman wrote: I would think that these pairs of invocations would correspond: declare -A v1=$( $foo 3 ) declare -A v1=$( [1]=2 [3]="") declare -A v1=$( "$foo" 3 )

Re: No expansions performed while declaring an associative array using a list of keys and values

2020-12-16 Thread Glenn Jackman
On 2020-12-15 16:58, Chet Ramey wrote: > On 12/15/20 11:23 AM, Glenn Jackman wrote: > > I would think that these pairs of invocations would correspond: > > > > declare -A v1=$( $foo 3 ) > > declare -A v1=$( [1]=2 [3]="") > > > > declare -A v1=$( "$foo" 3 ) > > declare -A v1=$(