Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh: Strange feature with 'jobs' commmand



On Thu, 30 May 2002, Oliver Kiddle wrote:

> Tricks like jobs > >(cat -) sort-of work so I was thinking a special
> case hack for jobs might not need a big rewrite. But I've never gone
> near that part of zsh's code so wouldn't know.

jobs >>(cat) works because >>(...) forces cat into a subshell, leaving
jobs in the foreground.  That's an entirely different flow of control.

It's relatively easy to add a new `cl' arg value to entersubsh() as a flag
when the command to be executed is the `jobs' builtin, to leave the job
table un-erased.  However, the code that does the traversing/printing of
the job table is littered with tests to silence it when the process is not
the foreground shell -- it's be really tricky to make `jobs' do something
useful while still preventing `bg' and `fg' from doing something broken.



Messages sorted by: Reverse Date, Date, Thread, Author