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 4324
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: get the number of active jobs to show in the prompt?
- Date: Wed, 3 Oct 2001 16:59:09 +0200
- In-reply-to: <20011003162246.C32766@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20011002181324.A29201@xxxxxxxxxxxxxx> <200110022325.JAA07306@xxxxxxxxxxxxxxxxxxxxxxxx> <4ac3633923vincent@xxxxxxxxxx> <1011003054350.ZM25561@xxxxxxxxxxxxxxxxxxxxxxx> <20011003162246.C32766@xxxxxxxxxxxxxx>
On Wed, Oct 03, 2001 at 16:22:46 +0200, Vincent Lefevre wrote:
> This doesn't solve my problem: for instance, after a Ctrl-L, the
> message disappears. I think that the best thing I can do is to put
> the jobs status directly to the terminal title, and this can be
> done with TRAPCLD.
I now have the following:
precmd()
{
psvar[1]=$#jobstates;
if [[ $psvar[1] -eq 0 ]] then
psvar[1]=()
elif [[ $psvar[1] -eq 1 ]] then
psvar[1]="$psvar[1] job"
else
psvar[1]="$psvar[1] jobs"
fi
# Note: STY is set by screen
if [[ $TERM == (xterm*|dtterm|rxvt) && -z $STY ]] then
print -nP "\e]1;%m:%.\x07"
print -nP "\e]2;%(1v. [%1v] .)${WINTITLE:+ [$WINTITLE]} %n@%m - %~ \x07"
fi
}
TRAPCLD() { precmd }
--
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