From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9604 invoked from network); 18 Oct 2001 22:01:31 -0000 Received: from unknown (HELO sunsite.dk) (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Oct 2001 22:01:31 -0000 Received: (qmail 17819 invoked by alias); 18 Oct 2001 22:01:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4396 Received: (qmail 17807 invoked from network); 18 Oct 2001 22:01:08 -0000 Date: Fri, 19 Oct 2001 00:01:05 +0200 To: zsh-users Subject: Re: Number of jobs in prompt Message-ID: <20011019000105.A13783@Amber.lab.icm.edu.pl> Mail-Followup-To: zsh-users References: <20011018234853.C5311@strindberg.maisel.enst-bretagne.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011018234853.C5311@strindberg.maisel.enst-bretagne.fr> User-Agent: Mutt/1.3.23i X-PGP: 1024D/D619540D; A0E5 7DA4 56B5 8171 42FA 8F8F BED1 B3E7 D619 540D; 2000-03-17 -- 2002-03-17 From: Michal Politowski On Thu, 18 Oct 2001 23:48:53 +0200, Jesper Holmberg wrote: > I would like to have the current number of (background) jobs displayed > in my prompt, but I can't find any variable for this. Would it still be > possible to achieve this? The zsh/parameter module provides three job-related associative arrays: jobdirs, jobtexts and jobstates. So eg. I load the module: zmodload -i zsh/parameter have in my prompt the sequence: %(1v.(bg %v%).) and have the following precmd defined: precmd() { psvar[1]=$#jobtexts; [[ $#jobtexts -eq 0 ]] && psvar[1]=(); } -- Michal Politowski -- mpol@lab.icm.edu.pl Warning: this is a memetically modified message