Rusty Bird writes:
>> The behavior of set -e is extremely surprising [...]
> Has it ever been considered to add something like 'shopt -s
> composable_compound'? Roughly meaning "execution and exit status of a
> compound command are not changed by surrounding context (in the sense
> of logical ope
Greg Wooledge:
> The behavior of set -e is extremely surprising, and people should
> stop expecting it to make intuitive sense. The best way to avoid being
> surprised by it is to stop using it altogether.
Has it ever been considered to add something like 'shopt -s
composable_compound'? Roughly m
On 17/11/2020 at 16:00, Ilkka Virta wrote:
Now, perhaps that could use a note explicitly saying this also means
subshells, even though they may
have set -e in effect independently of the main shell.
The part explaining subshells (3.7.3 Command Execution Environment) could
perhaps also use a men
On Tue, Nov 17, 2020 at 4:07 PM Pierre Colombier via Bug reports for the
GNU Bourne Again SHell wrote:
> #2
> pierre@zebulon: ~ $ (set -e ; echo A ; false ; echo B ) && echo C.$?
> #3
> pierre@zebulon: ~ $ bash -c 'set -e ; echo A ; false ; echo B ' && echo
> C.$?
If it's not a bug, I thi
On Tue, Nov 17, 2020 at 09:35:35AM +0100, Pierre Colombier via Bug reports for
the GNU Bourne Again SHell wrote:
> I'm not sure this is actually a bug since dash act the same way but
> it's quite unexpected for the average user
Agreed! The behavior of set -e is extremely surprising, and
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
-fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall$
uname output: Linux zebulon 4.19.0-11-amd64