Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pipe issues with 'jobs' command
- X-seq: zsh-users 4438
- From: Le Wang <lewang@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: pipe issues with 'jobs' command
- Date: Mon, 29 Oct 2001 23:14:49 -0500 (EST)
- In-reply-to: <20011029002105.B3832@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
--- Sweth Chandramouli <svc@xxxxxxxxx> wrote:
> On Sun, Oct 28, 2001 at 08:37:48PM -0500, Le Wang
> wrote:
> > Pretty weird, eh?
> Not really; this is the expected behaviour. This
> was
> just discussed in another thread earlier this month;
> search the archives
> for the thread "get the number of active jobs to
> show in the prompt?".
>
> -- Sweth.
>
> --
> Sweth Chandramouli ; <svc@xxxxxxxxxxxxxx>
> President, Idiopathic Systems Consulting
okay, thanks a lot. That's really helpful. So a
subshell was being created on the lhs of the
pipe...that makes sense. But looking at the following
code from my .zshrc:
--------------
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?
thanks
-lw
_______________________________________________________
Do You Yahoo!?
Get your free @yahoo.ca address at http://mail.yahoo.ca
Messages sorted by:
Reverse Date,
Date,
Thread,
Author