Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `jobs | wc -l' => 0 ... bug?
- X-seq: zsh-workers 13781
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: `jobs | wc -l' => 0 ... bug?
- Date: Mon, 26 Mar 2001 16:48:37 +0000
- In-reply-to: <Tc0a88d01528834c8ea@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Tc0a88d01528834c8ea@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Mar 26, 3:29pm, Peter Stephenson wrote:
} Subject: Re: `jobs | wc -l' => 0 ... bug?
}
} > $ 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.
What do you suggest, that we special-case the "jobs" command?
Zsh runs the left-hand-side of pipelines in a subshell and the right-
hand-side in a current shell so that stuff like
echo foo | read line
echo $line
will output "foo". Bash (I believe) runs the right-hand-side in a subshell
and the left in the current shell. I like zsh's way better.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author