On Thu, Sep 7, 2017 at 12:35 PM, Chet Ramey <address@hidden> wrote:
> On 9/7/17 12:23 PM, Andy Chu wrote:
>
> > I did a very principled implementation of errexit in OSH. I didn't find
> > any problems with it in THEORY. Yes in practice bash has surprising
> > behavior, but in theory it's a good idea, and it's not hard to implement.
> > There are just a handful of places where you turn it off: the condition
> of
> > while/until loops, if conditions, all clauses in && and || except the
> last
> > clause, etc.
> >
> > The main thing I disallowed was the weird behavior mutating errexit while
> > it's disabled, which bash has a somewhat odd rule for. Example:
>
> Which Posix requires.
>
Yes fair enough. Bash is the most popular shell by far so it gets "blamed"
for behavior that's necessary for POSIX compatibility and compatiblity with
other shells.
I had noticed that some people discourage or complain about "bash-isms"
(this seems to be common in Debian.) As far as I can tell, most of those
things are historically "ksh-isms", but nobody calls them that.
Andy