On 4/8/24 08:18, arnold@skeeve.com wrote:
Dan Cross <crossd@gmail.com> wrote:

I wonder if anyone can shed any light on the timing and rationale for
the introduction of “word erase” functionality to the kernel terminal
driver. My surface skim earlier leads me to believe it came to Unix
with 4BSD, but it was not reincorporated into 8th Edition or later,
nor did it make it to Plan 9 (which did incorporate ^U for the "line
kill" command).  TOPS-20 supports it via the familiar ^W, but I'm not
sure about other PDP-10 OSes (Lars?).  Multics does not support it.
VMS does not support it.

What was the proximal inspiration?  The early terminal drivers seem to
use the Multics command editing suite (`#` for erase/backspace, `@`
for line kill), though at some point that changed, one presumes as
TTYs fell out of favor and display terminals came to the fore.

        - Dan C.
My memory jibes with this -- through V7 defaults were # and @, and BSD
changed to ^H / DEL and ^U.  ^W was a BSD thing, probably inspired by
TOPS-10.

Vi had ^W for word erase long before the tty driver. It's documented in 2BSD.

I think it appeared in the tty driver as part of the new tty driver, around 4.1C. The 4.2 stty(1) documents that you can set werase but only with the new tty driver.

Personally I fondly recalled it from Tenex and wished for it in UNIX. I can't recall if I lobbied for it or if anyone heard me.

Chambers and Quarterman noted the new tty driver's presence in 4.1C. https://gunkies.org/wiki/UNIX*_System_V_and_4.1C_BSD

2.2.5  Ioctls   The  ioctl  system   call   is   essentially
          identical  in  the two systems.  The interesting differences
          are in the terminal driver ioctls.  Both drivers utilize the
          ``line  discipline''  notion,  allowing dynamic choice among
          several protocols by the user process.

               Berkeley offers several new features in  4.1C BSD  over
          the V7 terminal driver.  Some of these are accessed as a new
          line discipline (the ``new tty'' discipline),  while  a  few
          others  are implemented as additional ioctl calls.

Thanks,

      Mary Ann Horton (she/her/ma'am)
      Award Winning Author
      maryannhorton.com