ERR trap fired in && compound inside a function

2017-12-16 Thread Yury Kartynnik
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/home/kartynnik/.l

Re: ERR trap fired in && compound inside a function

2017-12-16 Thread Chet Ramey
On 12/16/17 8:15 AM, Yury Kartynnik wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > ERR trap gets fired when a non-last command in a && compound > command inside a function returns a non-zero code. > This doesn't happen when the compound c

Re: ERR trap fired in && compound inside a function

2017-12-16 Thread yury
Ah, pardon me, you're right. But I would expect $BASH_COMMAND inside the trap handler be 'f' in this case. 18:01, 16 �нежн� 2017, Chet Ramey : On 12/16/17 8:15 AM, Yury Kartynnik wrote:  Bash Version: 4.4  Patch Level: 12  Release Status: release  Descr

Re: foo=$*: ^A and DEL are prefixed or removed

2017-12-16 Thread Chet Ramey
On 11/24/17 3:17 AM, Martijn Dekker wrote: > Here's another corner-case bug with assigning $* to a variable (i.e.: > foo=$*). If IFS is empty, the $* expansion removes any $'\001' (^A) and > $'\177' (DEL) characters. If IFS contains a value, each ^A and DEL > character is prefixed by another $'\001