zsh-workers
 help / color / mirror / code / Atom feed
* Re: `jobs | wc -l' => 0 ... bug?
@ 2001-03-27  6:54 Sven Wischnowsky
  0 siblings, 0 replies; 7+ messages in thread
From: Sven Wischnowsky @ 2001-03-27  6:54 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> > From: neonatus@neonatus.net (Bostjan Muller)
> > jobs | wc -l | tr -d " "
> > but in zsh wc does not seem to get any input:
> > $ jobs
> > [1]  - suspended  mc
> > [3]  + suspended  mc
> > 
> > $ jobs | wc -l
> >       0
> 
> jobs here runs in a subshell, where there is no job control, so no
> information on jobs.  It has always been this way.  It's not particularly
> convenient, however.  Maybe it's time someone thought about changing it.
> 
> The only workaround is to use a temporary file for output.

But in zsh one can do that faster with ${#jobdirs} (or jobstates or
jobtexts) anyway.  After the parameter module is loaded.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 7+ messages in thread
* `jobs | wc -l' => 0 ... bug?
@ 2001-03-26 15:18 Adam Spiers
  2001-03-26 15:29 ` Peter Stephenson
  2001-03-26 15:33 ` Thomas Köhler
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Spiers @ 2001-03-26 15:18 UTC (permalink / raw)
  To: zsh workers mailing list

----- Forwarded message from Bostjan Muller <neonatus@neonatus.net> -----

Date: Fri, 23 Mar 2001 18:09:31 +0100
To: Adam Spiers <adam@spiers.net>
Subject: Re: the power of zsh
From: neonatus@neonatus.net (Bostjan Muller)
X-Parp-Accepted: had In-Reply-To: header

[snip]

Only one more thing.. I used to include a command in my prompt, that displayed
the number of background processes running I got the number with the following
command:
jobs | wc -l | tr -d " "
but in zsh wc does not seem to get any input:
$ jobs
[1]  - suspended  mc
[3]  + suspended  mc

$ jobs | wc -l
      0

Where in bash I get this:
$ jobs
[1]-  Stopped                 /usr/bin/mc $*
[2]+  Stopped                 /usr/bin/mc $*

$ jobs | wc -l
      2
----- End forwarded message -----

This is a bug, surely?


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-03-27 13:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-27  6:54 `jobs | wc -l' => 0 ... bug? Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2001-03-26 15:18 Adam Spiers
2001-03-26 15:29 ` Peter Stephenson
2001-03-26 16:48   ` Bart Schaefer
2001-03-26 17:04     ` Peter Stephenson
2001-03-27 13:13     ` Adam Spiers
2001-03-26 15:33 ` Thomas Köhler

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).