From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9971 invoked from network); 1 Oct 2007 09:53:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Oct 2007 09:53:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99296 invoked from network); 1 Oct 2007 09:53:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Oct 2007 09:53:25 -0000 Received: (qmail 4035 invoked by alias); 1 Oct 2007 09:53:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23883 Received: (qmail 4022 invoked from network); 1 Oct 2007 09:53:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Oct 2007 09:53:23 -0000 Received: (qmail 99010 invoked from network); 1 Oct 2007 09:53:23 -0000 Received: from cluster-g.mailcontrol.com (85.115.41.190) by a.mx.sunsite.dk with SMTP; 1 Oct 2007 09:53:15 -0000 Received: from rly07g.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly07g.srv.mailcontrol.com (MailControl) with ESMTP id l919r8Kq001725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Oct 2007 10:53:12 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly07g.srv.mailcontrol.com (MailControl) id l919qE88031830 for zsh-workers@sunsite.dk; Mon, 1 Oct 2007 10:52:14 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly07g-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id l919pjLq031070; Mon, 01 Oct 2007 10:52:14 +0100 (BST) Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 1 Oct 2007 10:52:10 +0100 Date: Mon, 1 Oct 2007 10:52:10 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Cc: Bas Zoetekouw , 444583-forwarded@bugs.debian.org Subject: Re: Bug#444583: zsh: precmd not executed before a new prompt is displayed when a job exists Message-ID: <20071001105210.31a61064@news01> In-Reply-To: <20070929152845.GA23884@scowler.net> References: <20070929151035.19446.15860.reportbug@cordelia.baz.lan> <20070929152845.GA23884@scowler.net> Organization: CSR X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Oct 2007 09:52:10.0119 (UTC) FILETIME=[BC0FA970:01C80410] X-Scanned-By: MailControl A-07-08-10 (www.mailcontrol.com) on 10.71.1.117 On Sat, 29 Sep 2007 11:28:45 -0400 Clint Adams wrote: > On Sat, Sep 29, 2007 at 05:10:35PM +0200, Bas Zoetekouw wrote: > > Zsh's man page says: "precmd Executed before each prompt." > > However, it doesn't seem to be executed in the following situation: > > > > - start xeyes in the background (xeyes &) > > - kill the xeyes window > > - the zsh then displays something like "[1] + done xeyes" and a new > > prompt. Before this prompt, the precmd command doesn't seem to be > > executed. > > > > This situation is a bit annoying for be, because I use precmd to put > > the number of background jobs in the xterm title. However, when I > > kill one of these backgorund applications, the xterm title isn't > > updated currently. > > Could someone clarify the documentation here? How about this? Index: Doc/Zsh/func.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/func.yo,v retrieving revision 1.15 diff -u -r1.15 func.yo --- Doc/Zsh/func.yo 10 Nov 2006 09:59:27 -0000 1.15 +++ Doc/Zsh/func.yo 1 Oct 2007 09:40:01 -0000 @@ -188,7 +188,9 @@ findex(precmd) vindex(precmd_functions) item(tt(precmd))( -Executed before each prompt. +Executed before each prompt. Note that precommand functions are not +reexecuted simply because the command line is redrawn, as happens, for +example, when a notification about an exiting job is displayed. ) findex(preexec) vindex(preexec_functions) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070