Subject: Re: ^W killed my line
To: NetBSD current-users mailing list <current-users@netbsd.org>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: current-users
Date: 02/29/2000 13:37:04
Greg A. Woods wrote:
> Ah, why would anyone expect that changing the tty line edit characters
> would have any effect on a character-oriented editor that's built into
> some application (such as /bin/sh, ftp, gdb, or whatever)? Would you
> really expect "stty werase :" to change vi's interpretation of ':'? I
> sure wouldn't. Neither do I assume that "stty erase ^?" will change my
> settings of delete-backward-char in emacs or jove.
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. What did you expect to happen? If your strange editor
doesn't do this, then perhaps you should change it ;-)
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.
> Yes there is some trickery with /bin/sh since it is fundamentally
> perceived to be tied to the very idea of command-line input. However
> there's a big difference between "cat -u | sh" and "sh -E"!
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 ...
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?
Thanks,
J
--
My other computer also runs NetBSD
http://www.netbsd.org/