From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27775 invoked from network); 26 Mar 2001 16:49:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Mar 2001 16:49:25 -0000 Received: (qmail 18225 invoked by alias); 26 Mar 2001 16:49:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13781 Received: (qmail 18204 invoked from network); 26 Mar 2001 16:49:18 -0000 From: "Bart Schaefer" Message-Id: <1010326164837.ZM13050@candle.brasslantern.com> Date: Mon, 26 Mar 2001 16:48:37 +0000 In-Reply-To: Comments: In reply to Peter Stephenson "Re: `jobs | wc -l' => 0 ... bug?" (Mar 26, 3:29pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: `jobs | wc -l' => 0 ... bug? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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