From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17846 invoked from network); 29 Sep 2007 21:32:04 -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; 29 Sep 2007 21:32:04 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 91308 invoked from network); 29 Sep 2007 21:31:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Sep 2007 21:31:59 -0000 Received: (qmail 25902 invoked by alias); 29 Sep 2007 21:31:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23855 Received: (qmail 25886 invoked from network); 29 Sep 2007 21:31:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Sep 2007 21:31:56 -0000 Received: (qmail 91027 invoked from network); 29 Sep 2007 21:31:56 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 29 Sep 2007 21:31:49 -0000 Received: from torch.brasslantern.com ([71.116.76.59]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JP50054PFS3FKR9@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 29 Sep 2007 16:31:18 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id l8TLVEPW009094; Sat, 29 Sep 2007 14:31:14 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id l8TLVDdt009093; Sat, 29 Sep 2007 14:31:13 -0700 Date: Sat, 29 Sep 2007 14:31:13 -0700 From: Bart Schaefer Subject: Re: Bug#444583: zsh: precmd not executed before a new prompt is displayed when a job exists In-reply-to: <20070929152845.GA23884@scowler.net> To: zsh-workers@sunsite.dk Cc: 444583-forwarded@bugs.debian.org, Bas Zoetekouw Message-id: <070929143113.ZM9092@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20070929151035.19446.15860.reportbug@cordelia.baz.lan> <20070929152845.GA23884@scowler.net> Comments: In reply to Clint Adams "Re: Bug#444583: zsh: precmd not executed before a new prompt is displayed when a job exists" (Sep 29, 11:28am) On Sep 29, 11:28am, Clint Adams wrote: } Subject: Re: Bug#444583: zsh: precmd not executed before a new prompt is d } } On Sat, Sep 29, 2007 at 05:10:35PM +0200, Bas Zoetekouw wrote: } > - 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. } } Could someone clarify the documentation here? Do you mean clarify it for you, here on the list, or clarify it in the yodl files for commit to CVS? I'm not really sure how to do the latter. To explain that "before each prompt" does not mean "before each time the prompt is printed" but rather "before each time zsh computes the prompt it will be re-printing over and over between finishing the previous command and the next time the accept-line widget is executed" is probably *more* confusing rather than less. Bas, how would you phrase it? The thing is, that when zsh is interrupted by the child-exited signal handler and displays the "[1] + done xeyes" message, the prompt that it prints next is the SAME prompt that it printed before; it's merely re-printing the "old" prompt to make the display look nice. The precmd function is run only when zsh regenerates a NEW prompt. But it's simply not possible to document every possible special case; in fact, you won't even get the "[1] + done xeyes" if you "unsetopt NOTIFY", and NOTIFY is not set by default, so the circumstance you describe doesn't happen in the shell's base configuration.