From: Michal Politowski <mpol@charybda.icm.edu.pl>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Re: Number of jobs in prompt
Date: Fri, 19 Oct 2001 00:01:05 +0200 [thread overview]
Message-ID: <20011019000105.A13783@Amber.lab.icm.edu.pl> (raw)
In-Reply-To: <20011018234853.C5311@strindberg.maisel.enst-bretagne.fr>
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
next prev parent reply other threads:[~2001-10-18 22:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-18 21:48 Jesper Holmberg
2001-10-18 22:01 ` Michal Politowski [this message]
2001-10-19 9:25 ` Jesper Holmberg
2001-10-19 9:47 ` Oliver Kiddle
2001-10-19 16:38 ` Michal Politowski
2001-10-22 0:17 ` Deborah Ariel Pickett
2001-10-18 22:16 ` please unscribe me Matthew Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011019000105.A13783@Amber.lab.icm.edu.pl \
--to=mpol@charybda.icm.edu.pl \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).