Re: Bug with && in piped functions in minimal-config bash

2016-11-05 Thread Chet Ramey
On 11/4/16 5:41 PM, Martijn Dekker wrote: > My development with Modernish just exposed the following bug on bash > 4.4.0(1)-maint, bash-20161028 snapshot, compiled with > --enable-minimal-config --enable-alias: > > $ fn() { false && echo bug || echo ok; } > $ fn > ok > $ fn > ok > $ fn | cat > ok

Re: Bug with && in piped functions in minimal-config bash

2016-11-04 Thread Martijn Dekker
Op 04-11-16 om 21:41 schreef Martijn Dekker: > $ fn() { false && echo bug || echo ok; } > $ fn > ok > $ fn > ok > $ fn | cat > ok > $ fn | cat > bug > $ fn | cat > bug > $ (fn) | cat > ok Another datapoint: the result and output is exactly as above even if you use if/then/else. fn() { if false; t

Bug with && in piped functions in minimal-config bash

2016-11-04 Thread Martijn Dekker
My development with Modernish just exposed the following bug on bash 4.4.0(1)-maint, bash-20161028 snapshot, compiled with --enable-minimal-config --enable-alias: $ fn() { false && echo bug || echo ok; } $ fn ok $ fn ok $ fn | cat ok $ fn | cat bug $ fn | cat bug $ (fn) | cat ok So apparently thi