Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pipe issues with 'jobs' command
- X-seq: zsh-users 4439
- From: Zefram <zefram@xxxxxxxx>
- To: Le Wang <lewang@xxxxxxxxx>
- Subject: Re: pipe issues with 'jobs' command
- Date: Tue, 30 Oct 2001 04:20:41 +0000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20011030041449.97914.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20011029002105.B3832@xxxxxxxxxxxxxxxxxx> <20011030041449.97914.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Le Wang wrote:
>getJobCount () {
> print "$#jobtexts";
>}
>
>prompt_le1_precmd () {
> PS1="$(getJobCount) %# "
> PS2="%_> "
> PS3="?# "
>}
>--------------
>
>If I call getJobCount from the shell directly (e.g.
>execute the command 'getJobCount'), I get the real
>number of jobs, but my prompt always prints 0. What's
>going on here?
$() also creates a subshell.
You might find psvar and the %v prompt sequence helpful.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author