Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: get the number of active jobs to show in the prompt?
- X-seq: zsh-users 4307
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: get the number of active jobs to show in the prompt?
- Date: Mon, 1 Oct 2001 19:44:06 +0200
- In-reply-to: <20011001110454.A7643@xxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200110010600.f9160iq10821@xxxxxxxxxxxxxxxx> <200110010828.SAA20292@xxxxxxxxxxxxxxxxxxxxxxxx> <20011001110454.A7643@xxxxxxxxxxx>
On Mon, Oct 01, 2001 at 11:04:54 +0200, Phil Pennock wrote:
> zmodload zsh/parameter
> function precmd { [... all the other bits ...]
> psvar[2]=$#jobstates; [[ $psvar[2] -eq 0 ]] && psvar[2]=()
> }
> and then in PS1: %(2v:<+%2v>:-)
There is a small problem, though: When a job terminates and the prompt
is reprinted, precmd isn't called and the prompt isn't rebuilt, so that
I still get the old prompt. I'd prefer to get a new prompt (a bit like
when I type [Return]). Is there an option to have this behaviour?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author