[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Awkward behavior of empty arrays
From: |
Andy Chu |
Subject: |
Re: [Help-bash] Awkward behavior of empty arrays |
Date: |
Thu, 7 Sep 2017 13:00:33 -0700 |
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
- Re: [Help-bash] Awkward behavior of empty arrays, (continued)
- Re: [Help-bash] Awkward behavior of empty arrays, Cristian Zoicas, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Cristian Zoicas, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Greg Wooledge, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Andy Chu, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Chris F.A. Johnson, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, DJ Mills, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Chet Ramey, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays,
Andy Chu <=
- Re: [Help-bash] Awkward behavior of empty arrays, Chet Ramey, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Andy Chu, 2017/09/07
- Re: [Help-bash] Awkward behavior of empty arrays, Chet Ramey, 2017/09/09
- Re: [Help-bash] Awkward behavior of empty arrays, Chet Ramey, 2017/09/07
Re: [Help-bash] Awkward behavior of empty arrays, Andy Chu, 2017/09/06