Anybody want to fix ash's backspace line wrap?

Cathey, Jim jcathey at ciena.com
Thu May 14 00:51:22 UTC 2009


>Unix started out on teletypes, and still thinks it's talking to a
keyboard 
>connected to a daisy-wheel printer via a serial port with a defined
baud

ASR-33, usually.  Pre-daisy-wheel.  Used ed on one of those a fair
bit back in school.

>Also, the first version of Unix was written in 1969.  DEC's VT100
started 
>shipping in 1970 and IBM's TN3270 in 1972.  Presumably by "predates by
a

Wiki claims VT100 in 1978, which jibes with my memory.  Its
escape sequence design pretty much required a microprocessor,
whereas earlier glass tty's like the ADM-3 were entirely implemented
in hardware.  Things like the ADM-3 (Or maybe a Perkin Elmer Fox?)
are where the first bad backspace behavior must have come from,
and they were probably just emulating most printing terminals that
really didn't want to reverse-linefeed anyway.  (And even if they
could, what would be the point in an interactive session?  Ink's
already down on the paper.)

How things got into the cruddy state they were/are in certainly
makes sense.  What to do about it, that was/is harder!

>The Commodore 64 made this easy, as did DOS.

Neither of which had a universal I/O redirection model,
and neither of which had to support an expensive already-deployed
array of I/O hardware.  An ADM-3 was around $1000 in 1975, they
were _not_ interested in throwing them away just because it didn't
backspace right!

>Both ash and bash clear the screen when you hit ctrl-L.  That's not
_quite_ 
>the same thing as getting the line editing metrics right.

Guess I'm thinking of ksh, which did not do this.  Seems dumb to
also do the formfeed action as well in such an interactive editing
session.  Csh also had some equivalent repaint character, but I
think it was different than ksh's.  Neither cleared the screen
when you called for a refresh of the current line due to external
(asynchronous) I/O activity that polluted the view.

-- Jim






More information about the busybox mailing list