Subject: Re: ^W killed my line
To: NetBSD current-users mailing list <current-users@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 02/28/2000 17:54:30
[ On Monday, February 28, 2000 at 13:14:05 (+0000), Julian Coleman wrote: ]
> Subject: Re: ^W killed my line
>
> isn't werase the stty equivalent of emacs' kill-previous-word?  Thus,
> shouldn't sh/libedit behave in the same fashion if I have either :
> 
>   stty werase ^W
> 
> or :
> 
>   stty werase ^F
> 
> ?

Yes (if I understand you correctly).

If libedit is in control then the "editing" features of the tty driver
should be disabled.  If the current libedit bindings happen to map to
the same keys as are set in the tty driver then that's probably a good
thing for some or even most people.  However I don't think libedit
should every override any default bindings with any current stty
settings -- let the user do this purposefully rather than doing it by
magic.

Where this gets confusing is in the transition between something using
libedit and normal stdin.  Those of us who've been using "set -o emacs"
for ever and a day are accustomed to this transition and usually have
trained ourselves to know when to press <ESC>-<BACKSPACE> and when to
press <CTRL-W> (though we are often somewhat surprised, and usually
pleasantly so, when we find new applications other than just /bin/sh
supporting command-line editing).

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>