From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16340 invoked from network); 1 Oct 2001 06:10:40 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Oct 2001 06:10:40 -0000 Received: (qmail 15731 invoked by alias); 1 Oct 2001 06:10:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4300 Received: (qmail 15717 invoked from network); 1 Oct 2001 06:10:27 -0000 Date: Mon, 1 Oct 2001 08:09:54 +0200 From: Goran Koruga To: zsh-users@sunsite.dk Subject: Re: get the number of active jobs to show in the prompt? Message-ID: <20011001080954.B19395@isis.hermes.si> References: <200110010600.f9160iq10821@bang.houseoflove> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: <200110010600.f9160iq10821@bang.houseoflove>; from drewp@bigasterisk.com on Sun, Sep 30, 2001 at 10:56:50PM -0700 Sender: Goran Koruga X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) On Sun, Sep 30 2001, Drew Perttula wrote: Hi, export PS1="`jobs | wc -l`" should work if you have PROMPT_SUBST set. However, while testing it, I noticed that jobs | wc -l always prints 0 (other commands can't get its output either), so someone else will have to explain you why this happens. Goran > > Hello everyone- > > I'm tired of using my close-window shortcut to zap shells > that still owned running programs, so I'd like my zsh prompt > to indicate that somehow. I can't figure out how to do anything > programmatically with the 'jobs' command (such as "jobs | wc -l"), > so I'm lost as to how to do my prompt trick. > > TIA for any help > > -Drew > -- Writing about music is like dancing about architecture. -- Frank Zappa