From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15948 invoked by alias); 23 Nov 2014 19:57:47 -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: 33783 Received: (qmail 10281 invoked from network); 23 Nov 2014 19:57:45 -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 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=F/vgrRlI c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=5y4faFyK3SkA:10 a=e9c5w8oJHg9SRTC47soA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141123115755.ZM10874@torch.brasslantern.com> Date: Sun, 23 Nov 2014 11:57:55 -0800 In-reply-to: Comments: In reply to Mikael Magnusson "Re: BUG: failure in "vcs_info prompt" aborts precmd function" (Nov 23, 7:08pm) References: <5470C427.4050805@thequod.de> <5470CF7C.2000707@thequod.de> <5472040F.8020803@thequod.de> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: TRY_BLOCK_ERROR and exit status MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 23, 7:08pm, Mikael Magnusson wrote: } } % { $(< foo) } always { TRY_BLOCK_ERROR=0 }; echo hello } zsh: no such file or directory: foo } hello } } However, I'm not sure how to } make the construct return false when it failed with a fatal error. Arguably a fatal error should set both errflag and lastval nonzero, but that might require a lot of tiny changes all over the place ... on the other hand I think always+TRY_BLOCK_ERROR is the only way lastval can still be examined after errflag has been set, so maybe it would suffice to handle this there? What should the value of lastval ($?) be in this circumstance?