bash drops errexit option in sourced file

2012-12-03 Thread Robert Schiele
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.2 -L/home/abuild/rpmbuild/BUILD/bash-4.2/../readline-6.2 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCO

Re: bash drops errexit option in sourced file

2012-12-03 Thread Chet Ramey
On 12/3/12 4:12 AM, Robert Schiele wrote: > Bash Version: 4.2 > Patch Level: 24 > Release Status: release > > Description: > While normally sourced files have identical options set like the > invoking environment this is not true if the sourcing is done from > within a function foo that was calle

Re: IFS is ignored for nested functions with stdin redirection

2012-12-03 Thread Andrey Borzenkov
В Sun, 02 Dec 2012 22:33:14 -0500 Chet Ramey пишет: > On 12/2/12 11:52 AM, Andrey Borzenkov wrote: > > I hit this problem in DKMS code and could reduce it to the following > > example: > > Thanks for the report. The problem has to do with state in the process > substitution subshell preventing

Re: bash drops errexit option in sourced file

2012-12-03 Thread Robert Schiele
On Mon, Dec 3, 2012 at 4:25 PM, Chet Ramey wrote: > Since the `source' command is called in a context where all commands within > it should have the `errexit' flag disabled, bash chooses to satisfy this > requirement by turning off the flag that (internally) represents errexit. > Under most circum

Re: bash drops errexit option in sourced file

2012-12-03 Thread Chet Ramey
On 12/3/12 10:50 AM, Robert Schiele wrote: > On Mon, Dec 3, 2012 at 4:25 PM, Chet Ramey wrote: >> Since the `source' command is called in a context where all commands within >> it should have the `errexit' flag disabled, bash chooses to satisfy this >> requirement by turning off the flag that (int

Re: bash drops errexit option in sourced file

2012-12-03 Thread Chet Ramey
On 12/3/12 11:07 AM, Chet Ramey wrote: > On 12/3/12 10:50 AM, Robert Schiele wrote: >> On Mon, Dec 3, 2012 at 4:25 PM, Chet Ramey wrote: >>> Since the `source' command is called in a context where all commands within >>> it should have the `errexit' flag disabled, bash chooses to satisfy this >>>

Re: "And" extended matching operator

2012-12-03 Thread Dan Douglas
On Wednesday, November 28, 2012 07:23:17 PM Nikolai Kondrashov wrote: > @(a&!(b)) This is the syntax ksh93 already uses. So far nobody else has adopted it, but the equivalent as you already mentioned is the transformation to: !(!(...)|!(...)) It's just a matter of implementing it. Other handy m