From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15615 invoked by alias); 22 Nov 2014 22:21:05 -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: 33759 Received: (qmail 8369 invoked from network); 22 Nov 2014 22:21:03 -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=El8osH+o8f2n//hSSssxn+LKgwH5U/RRp21FPe1thno=; b=jKj1/GEu2EARv1aO1nuG5XDqNhVplPsBG+veC3y3oGu0flrS6/TReS8fecAlHnvCHE r4nY2s5cJbnpgfT5ThdXjVZfcdZYQSz1pwAdUpUXRP79Q9jHI52C07YmFltg36nIghPH JVin/ZwwBoiCldmYhTsn2V6U9O+AzrmnHqCINQy+7AkOJrhCj2gYtDc2h3UFGX3cjXmB JC7i4vrYQhkeFVA3dyg3UtinVWAXRKsdcR9V3SPfxzzCxFaRP92mqAMr1kAFZZetRflM EBD3O4OCxV3m1RxnmXXVPjBVpa8ejQn9ZjSzL1A2HuQ1RXf/8L8ScsVIgaGcz8soLxrr unpA== MIME-Version: 1.0 X-Received: by 10.107.130.197 with SMTP id m66mr11466436ioi.10.1416694859885; Sat, 22 Nov 2014 14:20:59 -0800 (PST) In-Reply-To: <5470CF7C.2000707@thequod.de> References: <5470C427.4050805@thequod.de> <5470CF7C.2000707@thequod.de> Date: Sat, 22 Nov 2014 23:20:59 +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 Sat, Nov 22, 2014 at 7:01 PM, Daniel Hahler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 22.11.2014 18:51, Mikael Magnusson wrote: >>> I am using a precmd hook to setup my prompt and call "vcs_info 'prompt'" from there. >>> >>> When starting an interactive Git rebase, while the editor is still open, it will fail as follows: >>> >>> VCS_INFO_get_data_git:208: no such file or directory: .git/rebase-merge/done >>> >>> While this bug can be fixed (I'll post a patch), I think it's still a bug that vcs_info aborts the precmd. >>> >>> Why is that? >>> >>> I have tried adding "set +e" and "|| true" before the call to vcs_info, but without success. >> >> http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=33671 should fix >> this already. > > Yes, it's likely to fix this, although it might not be necessary to replace that many occurrences. > Also, I don't know if "$(cat ..)" is as efficient as "$(< ..)". Does it use a subshell, or is it optimized? > > 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'm not sure if that's a bug or not since it's documented to not be the case. (in Command Substitution, The substitution `$(cat foo)' may be replaced by the equivalent but faster `$(