Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: get the number of active jobs to show in the prompt?



On Sun, Sep 30 2001, Drew Perttula wrote:

Hi,

export PS1="`jobs | wc -l`" should work if you have PROMPT_SUBST set.
However, while testing it, I noticed that jobs | wc -l always prints 0
(other commands can't get its output either), so someone else will have
to explain you why this happens.

Goran

> 
> Hello everyone-
> 
> I'm tired of using my close-window shortcut to zap shells
> that still owned running programs, so I'd like my zsh prompt
> to indicate that somehow. I can't figure out how to do anything
> programmatically with the 'jobs' command (such as "jobs | wc -l"),
> so I'm lost as to how to do my prompt trick.
> 
> TIA for any help
> 
> -Drew
> 

--

Writing about music is like dancing about architecture.
    -- Frank Zappa 



Messages sorted by: Reverse Date, Date, Thread, Author