From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2035 invoked by alias); 28 Dec 2011 18:42:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16673 Received: (qmail 8470 invoked from network); 28 Dec 2011 18:42:51 -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 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Wed, 28 Dec 2011 19:42:45 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: PRINT_EXIT_VALUE problems Message-ID: <20111228184245.GX5329@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <20111224111347.GE3506@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6201-vl-r48020 (2011-12-20) On 2011-12-28 11:26:01 -0500, Nathan Dorfman wrote: > Unrelated to the apparent bug you've described, I've been using a > different mechanism to achieve the effect that (I think) you want. $? > does the right thing: > > % false || true ; echo $? > 0 > % false && true ; echo $? > 1 > > You can use the %? sequence in your prompt to see the exit value; I already do this. But PRINT_EXIT_VALUE provides more information. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)