From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10117 invoked from network); 30 May 2002 12:17:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 30 May 2002 12:17:10 -0000 Received: (qmail 2966 invoked by alias); 30 May 2002 12:16:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5011 Received: (qmail 2953 invoked from network); 30 May 2002 12:16:55 -0000 X-VirusChecked: Checked cc: zsh-users@sunsite.dk In-reply-to: <20020530135450.A16761@licia.dtek.chalmers.se> From: Oliver Kiddle References: <20020530135450.A16761@licia.dtek.chalmers.se> To: =?iso-8859-1?Q?Bj=F6rn_Johannesson?= Subject: Re: zsh: Strange feature with 'jobs' commmand MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4857.1022760969.1@logica.com> Date: Thu, 30 May 2002 13:16:22 +0100 Sender: kiddleo@logica.com Message-Id: On 30 May, you wrote: > > If you start a few jobs in the background and do: > zsh% jobs > [1] - running xmixer > [2] + running gtcd > zsh% _ > > ok, this is expected but this is not... > zsh% jobs | less > (END) > zsh% _ > > Why? This is quite annoying. You do not get any output if you pipe the > results from the "jobs" command. (jobs 2>&1|less doesn't work either) What is happening is that jobs is being run in a subshell. The subshell doesn't inherit the child processes (i.e. the jobs) so when jobs runs it doesn't find any to list. We could do with a mention of this in the FAQ (unless it is there already and my quick grep missed it). Incidentally, I think bash special cases the jobs builtin and would run less in a subshell in this case instead. Could we do something like this in zsh? Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.