From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27464 invoked by alias); 23 Nov 2014 18:08:14 -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: 33773 Received: (qmail 11757 invoked from network); 23 Nov 2014 18:08:12 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iT6Zt4y47btLSxmcJ6gZrByyEzMDgVm6MoK85TjnKBI=; b=eS3QNcVyTdab2l1C/vYUgKOoXr8Qvsx8jeZlk3S1IfmCwBag1caLrGJQGVFnaHx0WG LJFZdCcpdyX3roM8pz6B6h6pl+K/MeUDED4jMbiw2/xmuoJqCdkSOYqadPTt0OgXmNuz Za3Up2Xa4FitGgWXReKXuMf5I+mq6k82AKLzgwRu84vNKNDcJLC/BAkQU/LXYIhnO3Xu tch1vLYU9MSy8AZgr1/B63N/VVsJSucvV/Jr/ls2MSayr8Nk1a1AM3aHVV52/26Bk9AX FXWElKzjfDj2uxXdfQ1D8tmZHlDLceUjiOT5KeH/s6VgJcpTN8fx8FS5cTeQIqyzc/Qm ismw== MIME-Version: 1.0 X-Received: by 10.50.4.102 with SMTP id j6mr7936489igj.37.1416766087346; Sun, 23 Nov 2014 10:08:07 -0800 (PST) In-Reply-To: <5472040F.8020803@thequod.de> References: <5470C427.4050805@thequod.de> <5470CF7C.2000707@thequod.de> <5472040F.8020803@thequod.de> Date: Sun, 23 Nov 2014 19:08:07 +0100 Message-ID: Subject: Re: BUG: failure in "vcs_info prompt" aborts precmd function From: Mikael Magnusson To: Daniel Hahler Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Sun, Nov 23, 2014 at 4:58 PM, Daniel Hahler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 22.11.2014 23:20, Mikael Magnusson wrote: > >>> Apart from that, I am still wondering why the error in vcs_info causes abortion of the precmd function?! >> >> Passing a non-existing file to $(< is a fatal error, or whichever term >> is correct here. > > I got that, but e.g. `false` does not abort the precmd function. Yes, a command that returns false is not a fatal error. In the meantime you can do this to work around the problem. % { $(< foo) }; echo hello zsh: no such file or directory: foo % { $(< foo) } always { TRY_BLOCK_ERROR=0 }; echo hello zsh: no such file or directory: foo hello eg, call vcs_info inside the first { }. However, I'm not sure how to make the construct return false when it failed with a fatal error. -- Mikael Magnusson