Type-ahead in unix
Fred Stluka
stluka at software.org
Thu Apr 11 00:15:18 AEST 1991
In article <1991Apr9.112142.13195 at robobar.co.uk> ronald at robobar.co.uk
(Ronald S H Khoo) writes (as part of an ongoing diuscussion in
comp.unix.questions about how to best echo typeahead, for the
sake of you comp.sys.apollo guys to which I am cross-posting):
> Can someone explain how Rob Pike's Plan 9 stuff does *both* echoing
> immediately *and* rearranging the display so that the output doesn't
> have its appearance ruined? Sounds like the best of both worlds to me ..
Not exactly an answer to Ronald's question, but along the same lines...
The Apollo DOMAIN systems (running Unix) have a nice solution to this.
The window is divided into 2 panes with a horizontal line between them.
The top pane shows the command lines you have typed intermixed with the
lines of output generated, in the usual style of a Unix system on which
you have done no typeahead. The bottom pane is an editor window into
which you can type commands.
Ordinarily the bottom pane is one line long, and when you hit return the
command you typed scrolls into the top pane. However, if your previous
command has not yet completed, then the new command stays in the lower
pane which grows one line longer so that you can continue to enter more
commands. Each time you hit return, you get another line in the bottom
pane. Each time a command completes, the top line of the bottom pane
scrolls into the top pane and starts being processed. You get to see all
of your typeahead, as well as a clear indicator of which commands have
been processed so far. Also, the resulting top window shows a natural
mix of input and output, with nothing scrambled.
If you get ahead of the computer to the point that there are several
command lines waiting to be processed, you can scroll back up to those
lines and edit them, without affecting the lines which follow. You can
cause this to happen intentionally, by hitting the HOLD key to direct
the computer to stop processing commands (until you hit HOLD again),
if you want to compose a series of commands before allowing any of them
to be processed.
You can also cut and paste, from any window including the output pane,
into any window including the input pane. This makes it very easy to
write your own command line recall mechanism, by defining a key to
search backwards through the output pane for prompts and to copying
the rest of the line you choose (the command) into the input pane.
Unfortunately, HP has bought Apollo, and seems to plan to drop the
DOMAIN Display Manager. Hopefully, someone else will pick up on the
same idea, and it will become prevalent in Unix systems.
--Fred
--
Fred Stluka Internet: stluka at software.org
Software Productivity Consortium UUNET: ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070 USA
More information about the Comp.unix.questions
mailing list