[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set -e (no || or &&)
From: |
Linda Walsh |
Subject: |
Re: set -e (no || or &&) |
Date: |
Sun, 14 Oct 2012 17:21:05 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
Steven W. Orr wrote:
On 10/12/12 06:55, quoth Sergey Fadeev:
Why doesn't it exit the shell?
$ set -e
$ echo $(false)
Shouldn't the error code of $(false) command substitution be checked
by set -e before passing stdout to the echo builtin?
Isn't it the most logical behavior that most people would expect of
set -e?
Bash version: GNU bash, version 4.2.24(1)-release
(x86_64-redhat-linux-gnu) (if it matters)
Thanks
Seriously, can we just put a trap on all messages to this list that have
the string 'set -e' in it? Just point the sender to a message that tells
them to not use it.
----
Seriously -- why not just fix it?
If you think it is broken -- Fix it.
Don't just tell everyone not to use it because it is broken --
propose a fix, submit a patch.
Make it work. If it can't be fixed in bash because it's become the bourne
shell,
then create a Bourne-Again-Shell that designed to be free of the restrictions of
that shell... ... *ahhh***.. just don't get on a standards committee and be
brainwashed.
caught between hell and a hard place -- bash where previous compatibility is a
wistful dream and no options for such, and perl, where past compatibility trumps
all forward progress, and the default for every new release is that it will work
the same as windows 95... er.. perl5.0 or soemthing like that...
If only 'pash' existed....*sigh*...
;-)