In a previous episode, JJB wrote:
>That is weird and confusing. Is there somewhere a list of thing to
>"fix" if one day some people would like to break retrocompat and make
>a shell as good as bash (and some other well known) but cleaned from
>such historical queerness ?
The standard advice given here is "Don't use 'set -e'". See Greg's
most recent response on the list as well as his "BASH FAQ" web site.
The short answer (according to Greg) is that "set -e" is only there
for POSIX compatibility.
If you are going to use it, then you just have to familiarize yourself
with all its quirks.
If you're serious about wanting a "better bash", try googling for "Oil
Shell". This is a very interesting project that attempts to basically
re-write bash from the ground up (*), but unfortunately, it looks like
it was more or less abandoned around 2018.
(*) The Oil project actually comes in two flavors:
1) A (mostly) bash compatible version which claims to be able to
run (most) bash scripts directly, but fixes a few obvious flaws.
2) A total re-write that claims to fix all/most of the flaws.
As I say, an interesting, though clearly doomed, project. The point
is that if you are going to leave the shell behind, there's really no
need for yet another language. You might as well just switch to
something like Perl/Python/Ruby/etc.
=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.
When responding to my posts, please try to refrain from giving bureaucratic
answers.
If you have nothing useful to say, then just click Next and go on.