Where Goeth the Line-editing?

Keith Gabryelski ag at cbmvax.UUCP
Tue Aug 8 10:07:40 AEST 1989


To comp.unix.wizards since it seems more appropriate.

In article <795 at dms.UUCP> shepperd at dms.UUCP (Dave Shepperd) writes:
>From article <13303 at bloom-beacon.MIT.EDU>, by jik at athena.mit.edu
					       (Jonathan I. Kamens):
>>   In multics, it was possible to install a driver that lived at the
>> gateway between the actual terminal and user processes.  This driver
>> would intercept and process *all* input before sending it to the
>> process.  Therefore, if you wrote a line-editing driver and installed
>> it, it would work for *every* program on the system, without fail.
>> There were, of course, ways to turn off the line-editing features for
>> programs that needed character-by-character input.
>> 
>
>Actually, Un*x has this "feature" as well. At least, sort of. The
>concept of line disciplines was developed to address this issue (or
>other protocol handling requirements). Line discipline 0 is responsible
>for doing the input editing you get when doing normal (such as echo,
>backspace processing, line kill, signals, etc). It also does the stuff
>such as adding extra cr's, lf's, null's or other things in the output
>stream as so indicated by various stty flags. Line disciplines don't do
>the job as neatly as is desired (a better idea, STREAMS, was invented
>which does the job quite a bit better).

We actually just wrote a line discipline that emulates the TOPS-20
line discipline for our SYSV3.2 port to the Amiga (echoing only when
input was read), ^O, ^V, ^W, and no backspacing over your prompt.

I was going to add history and real command line editting, but finally
came to my senses that the kernel was just not the place for such a
user-configurable/messy thing.
	
The best suggestion I've heard is a daemon the user runs that gets
handed each character the user types and deals with them
and the canon buffer appropriately.

I did finally break down and added a last command hack but am sure
this will disappear when something better is found.

I am open to suggestions.

Pax, Keith



More information about the Comp.unix.questions mailing list