On Tue, May 28, 2019 at 08:42:38PM +0300, Reco wrote: > On Tue, May 28, 2019 at 01:37:48PM -0400, Greg Wooledge wrote: > > On Tue, May 28, 2019 at 08:32:31PM +0300, Reco wrote: > > > Quoting bash(1): > > > > > > -e Exit immediately if a pipeline (which may consist of a single > > > simple command), a list, or a compound command (see SHELL GRAMMAR > > > above), exits with a non-zero status. > > > > No fair snipping out the two paragraphs of exceptions and plot twists! > > IMO all GNU utilities provide complex and crossreference infested > manpages on purpose - so that the user could say "to hell with it", and > run "info <foo>" instead ☺
No, this isn't a GNUism. The definition of set -e *really is* that complicated. This is mandated by POSIX. And the definition is fluid, changing every few years as people bring up newly discovered special cases where it doesn't do the right thing, or is ambiguous or unclear. Then they debate for a few weeks (months, years) and publish a new interpretation. Here's an example from 2009-2012: <http://austingroupbugs.net/view.php?id=52>