From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11512 invoked from network); 18 Feb 2004 06:02:27 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Feb 2004 06:02:27 -0000 Received: (qmail 28124 invoked by alias); 18 Feb 2004 06:02:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19434 Received: (qmail 28103 invoked from network); 18 Feb 2004 06:02:19 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 18 Feb 2004 06:02:19 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.11.9.147] by sunsite.dk (MessageWall 1.0.8) with SMTP; 18 Feb 2004 6:2:19 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i1I62Ht12570 for zsh-workers@sunsite.dk; Tue, 17 Feb 2004 22:02:17 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040218060217.ZM12569@candle.brasslantern.com> Date: Wed, 18 Feb 2004 06:02:17 +0000 In-Reply-To: <20040218002553.GA1429@mail.guild.uwa.edu.au> Comments: In reply to James Devenish "Re: jobs not listing all commands" (Feb 18, 8:25am) References: <20040217075827.1498.qmail@web10410.mail.yahoo.com> <1040217221439.ZM12330@candle.brasslantern.com> <20040218002553.GA1429@mail.guild.uwa.edu.au> X-Mailer: Z-Mail (5.0.0 30July97) To: zw Subject: Re: jobs not listing all commands MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 18, 8:25am, James Devenish wrote: } Subject: Re: jobs not listing all commands } } > Prompts don't update between two interactive commands, ever, no matter } > what the reason. The prompt string is computed when ZLE initializes } > (just before it is first printed) and is thereafter used verbatim until } > the next re-initialize. } } I'm a bit confused by both of the both comments. What I mean by "between two interactive commands" is "after one command finishes (and the prompt is printed) but before the next one _begins_ (i.e. when accept-line is executed)." The empty command is still a command for this purpose. } Firstly, %j works "as a user would expect" for me in zsh v4.1.1 (i.e. } I get the behaviour that Felix expects). I suspect you really don't. Try this: zsh -f % PS1='njobs:%j %' njobs:0 % sleep 60 & njobs:1 % sleep 10 & njobs:2 % Now wait 10 seconds. You should see: [2] + done sleep 10 njobs:2 % Note that the prompt has not changed. If you now hit return, it should change to: njobs:1 % } Secondly, %t, %@, %T, %*, %? (etc.) work as expected in PS1 I think you'll find they work the same as %j in the example above.