Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: failure in "vcs_info prompt" aborts precmd function
- X-seq: zsh-workers 33773
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Hahler <dhahler@xxxxxxxxx>
- Subject: Re: BUG: failure in "vcs_info prompt" aborts precmd function
- Date: Sun, 23 Nov 2014 19:08:07 +0100
- Cc: zsh workers <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <5472040F.8020803@thequod.de>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <5470C427.4050805@thequod.de> <CAHYJk3S5pBBNnAKqyGRYq7KAstpSAJOPQRdbHjoKrurLKFbOcQ@mail.gmail.com> <5470CF7C.2000707@thequod.de> <CAHYJk3R81LhwfwxaDHRSMP0HZmbE7V3hrrn5Q4jGzRzBPRC=oQ@mail.gmail.com> <5472040F.8020803@thequod.de>
On Sun, Nov 23, 2014 at 4:58 PM, Daniel Hahler <dhahler@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author