From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26589 invoked by alias); 12 Oct 2012 13:29:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30729 Received: (qmail 22539 invoked from network); 12 Oct 2012 13:29:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <121012062923.ZM32754@torch.brasslantern.com> Date: Fri, 12 Oct 2012 06:29:23 -0700 In-reply-to: Comments: In reply to Peter Stephenson "Re: set -e (no && or ||)" (Oct 12, 12:53pm) References: <20121012110542.314890@gmx.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: set -e (no && or ||) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 12, 12:53pm, Peter Stephenson wrote: } Subject: Re: set -e (no && or ||) } } On Fri, 12 Oct 2012 07:05:41 -0400 } Sergey Fadeev wrote: } } > 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? } } No, because the command was "echo", and that didn't fail. The idea being that not every nonzero status is an error, and -e means to exit on error. For example, you generally don't want the shell to exit on something like this: while read line then echo This should eventually stop fi echo But you probably want to arrive here without exiting