Subject: Re: ^W killed my line
To: NetBSD current-users mailing list <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 02/29/2000 16:04:38
[ On Tuesday, February 29, 2000 at 13:37:04 (+0000), Julian Coleman wrote: ]
> Subject: Re: ^W killed my line
> Ah! I take it you haven't tried this? Try setting `stty werase :`, fire
> up vi, enter insert mode, then type a few words. Type a ':', see the last
> word get deleted.
Eghads! That's weird! Oddly enough <CTRL-W> still does a word-erase in
vi too but suddenly there's no way to get to the extended command
> What did you expect to happen?
That ':' would continue to have its default meaning of beginning an
extended (ex) command....
> If your strange editor
> doesn't do this, then perhaps you should change it ;-)
On the contrary if I wanted my editor to behave in such a way then I
would configure it to do so on purpose. I would not program it to
blindly follow the tty setting and get itself into the kind of trouble
vi seems willing to do.
> Anyway, even if sh/libedit ignores werase, shouldn't ^W still delete the word
> before the cursor? This seems to be the standard setting for readline.
Not in emacs mode.... :-)
> On my 1.4 system (don't have anything newer to test at hand), it means that
> `sh -E` always uses ^W for delete last word, but `sh` follows the `stty
> werase` setting. Neither uses ^W for kill. I've obviously missed your
> point ...
Hmmm.... that's not the case for 'sh' in any prior systems that I'm
running, nor in 1.4.1 or -current(1.4T), and I'd have reported it as a
bug if I'd discovered it in any other version! All the systems I've
tried it on always treat '^W' as "kill-region" as the default, just as
in Emacs or most of its clones.
(I see there's a bug of this nature in ksh now though....)
> Ignoring all this, I take it that it's not something strange that I'm doing
> and other people also see ^W act like kill and not werase?
If you're in emacs mode then the emacs interpretation of ^W (i.e.
kill-region) should always prevail unless the you have explicitly
re-configured it using the applications key rebinding functionality
(assuming there is any).
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>