Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: jobs command and pipes
- X-seq: zsh-users 1902
- From: Bruce Stephens <b.stephens@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: jobs command and pipes
- Date: 30 Oct 1998 15:08:49 +0000
- In-reply-to: "Owen M. Astley"'s message of "Fri, 30 Oct 1998 14:36:05 +0000 (GMT)"
- References: <Pine.OSF.3.96.981030143520.21124A-100000@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: B.Stephens@xxxxxxxxx
"Owen M. Astley" <oma1000@xxxxxxxxx> writes:
> Why is it that the jobs command in zsh will not work with a pipe,
> although redirecting it to a file does work?
>From a practical point of view, it's surely obvious. You can
implement
A | B
by forking twice, redirecting I/O appropriately in the two children,
and then one child executes A, and one executes B. I suspect
jobs | wc
*does* work. But the child process shell which executes the builtin
jobs doesn't have any jobs, so the result isn't interesting.
jobs > foo
doesn't require jobs to be executed in a subshell, so it'll work as
expected. (i.e., you get the list of jobs in the current shell,
rather than the empty list of jobs in a newly forked shell.)
So I think it's logical; probably a feature rather than a bug. If
it's a bug, I wouldn't expect a fix soon.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author