Subject: Re: ^W killed my line
To: None <current-users@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: current-users
Date: 03/02/2000 02:33:17
>>> I think you're hung up on the idea that the tty driver should be
>>> the one and only king of input editing.

>> Exactly.  That's what the tty driver is for.  To provide a
>> consistent way to input one's text to programs (and correct it).

> That's nice in theory, but this is Unix, not AmigaOS, and the tty
> driver's real job is to do the I/O, not to do input editing.  In Unix
> the application does the editing and the commonality and consistency
> is achieved by using the same code in every application (eg. in this
> case linking against libedit).

It's hard to believe you're sitting there with a straight face and
recommending code duplication in *every application* instead of putting
the code in *one* place.  (Well, okay, only those that take
line-oriented input; that's most of the programs that read from stdin
at all, based on a quick look at /bin and /usr/bin.)

But quite aside from that...this simply is false to historical fact, at
least in the last what, ten, fifteen years - however long I've been at
this stuff.  Everything since 4.1c, the first UNIX variant I used, has
done it as described, using the tty driver as *the* means of line
editing for line-oriented input.  A very few programs, most notably
shells, have had more sophisticated input line editors added to them,
but only recently (the last year or two) have I noticed it creeping
into other programs.

Before that...yes, the line editing provided by the tty driver was even
more rudimentary (typically just erase and kill).  So was everything
else; certainly in those days there was no libedit, readline, or
whatever you call it, infecting programs that did line-based input.

> I'd recommend that anyone interested in this heritage of Unix look
> not only at some of the older papers on the subject, but also look at
> the way Plan 9 approached this stuff too.

Weren't you the one who just recently was saying that Plan 9 was
definitely *not* UNIX?  It's an interesting alternative approach, but I
can't see much point in recommending it to someone interested "this
heritage of Unix", except perhaps for contrast - and then I'd
definitely point at a few others as well, like (say) VMS.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B