From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26500 invoked by alias); 27 Nov 2010 17:47:09 -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: 28462 Received: (qmail 25806 invoked from network); 27 Nov 2010 17:47:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.56 as permitted sender) Date: Sat, 27 Nov 2010 17:15:10 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: PROMPT_SP bug with local in precmd Message-ID: <20101127171510.1d8ea94b@pws-pc.ntlworld.com> In-Reply-To: <101126182734.ZM27122@torch.brasslantern.com> References: <20101126115148.GT1254@prunille.vinc17.org> <101126093810.ZM25915@torch.brasslantern.com> <20101126225316.325fa5ca@pws-pc.ntlworld.com> <101126182734.ZM27122@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=3VrKnBqHxFsA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=RNkMTN-qdDGWJkfsZVcA:9 a=JMRoX5HOgfwPrFiyu4MA:7 a=bGS6bEBdLtOYttMuglSmsxyAN4YA:4 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Fri, 26 Nov 2010 18:27:34 -0800 Bart Schaefer wrote: > However with a non-builtin command in the precmd, I'm still getting > "zsh: exit 1" printed twice, so I think we're both correct -- that > is, there's *another* place where a fflush() is needed. Looks like > just after line 3188 in Src/exec.c. > > With fflush() added there as well, I consistently get this: > > torch% setopt printexitvalue > torch% echo -n foo; false > foozsh: exit 1 > torch% precmd() { /bin/echo -n Hi } > torch% echo -n foo; false > foozsh: exit 1 > torch% > > Note there's now only one "zsh: exit 1" and the prompt now consistently > covers up the output from precmd. > > } I hope I'm not undoing any magic with this. > > Ditto. I've committed mine, so if you commit yours we can spend ages on mutual recrimination. (This is the Internet Age.) -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/