Erik Naggum <firstname.lastname@example.org> wrote:
| One of the things I would like to do in xterm, is to see the output of a
| pipeline and then decide what to do with it. One way to accomplish this
| is to send the output into a temporary file, view the file, and then use
| the file for input into the next pipeline. ... That is, I think the output
| of a process is a _value_ that I should be able to use for something more
| than merely gawk at.
This is a very useful model, but every time I've thought about it before I
kept bumping into the issue of non-terminating processes and/or interrupts
and/or the need for implied pagers. The problem with dumping the output
into a file and *then* viewing the file is that the pipeline might never
terminate and/or might fill up your disk. Also, for some tasks (e.g., finds,
greps) you want to see the partial progress in realtime, as it occurs.
But this time, given the CL context, I realized that maybe what was
needed is for there to be a parameterizable output limit that throws
a restartable exception when violated and/or drops you into a debugger
where you could scroll back and peruse the output so far and decide
whether to let it continue for a while longer (which with a smallish
limit gives you a "pager" function), or stop the pipeline (perhaps
by sending a signal, in a Unix environment) and save (or discard) the
output so far, or choose some other result entirely.
In any case, I think that any "CL Shell" needs to provide for
real-time viewing of the progress of a pipeline *and* some sort
of built-in pager *and* selectable output limits with interactive
exception handling, all without interfering with the ability to
treat the output as a "value".
 Scsh (a Scheme Shell) <URL:http://www-swiss.ai.mit.edu/ftpdir/scsh/>
contains a lot of very useful ideas and idioms (especially the
macros for describing & running pipelines) which would be worth
at least looking at before attempting a CL Shell, but AFAIK even
Scsh doesn't directly address the above "excess output" issue.
Rob Warnock, 30-3-510 <email@example.com>
SGI Network Engineering <http://reality.sgi.com/rpw3/> [R.I.P.]
1600 Amphitheatre Pkwy. Phone: 650-933-1673
Mountain View, CA 94043 PP-ASEL-IA
[Note: firstname.lastname@example.org and email@example.com aren't for humans ]