#595180 tcsh: ^W (werase) acts the same as ^U (kill)

Package:
tcsh
Source:
tcsh
Description:
TENEX C Shell, an enhanced version of Berkeley csh
Submitter:
Bjarni Ingi Gislason
Date:
2010-09-02 00:57:03 UTC
Severity:
normal
#595180#5
Date:
2010-09-01 19:08:09 UTC
From:
To:
  Output from "stty -a":

speed 38400 baud; rows 28; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

  Output from "setty":

iflag:-inlcr -igncr +icrnl
oflag:+opost +onlcr -onlret
cflag:
lflag:+isig +icanon +echo +echoe -echonl -noflsh +echoctl -flusho +iexten
chars:

  The "^W" acts as intended in the "bash" and "dash" shells.

#595180#10
Date:
2010-09-02 00:47:19 UTC
From:
To:
Bjarni Ingi Gislason writes:
[...]

stty modes are relevant when you're entering text in the tty's canonical
input mode, where there are only a few controls (erase, werase, kill). tcsh
has its own command line editor with its own configuration command (bindkey).
There's a vi-like mode and an emacs-like mode, and tons of individual
functions that can be bound to the keys of your choosing.

In emacs mode (bindkey -e), the initial action bound to ^W is "kill-region".
If you run bindkey -l, you get a list of actions and descriptions in which
kill-region is described as "Cut area between mark and cursor and save in cut
buffer". I guess you have to be an emacs user to make sense of that.

In vi mode (bindkey -v), the initial action bound to ^W is
"backward-delete-word", which is much closer to the werase you were looking
for. So you should probably either use vi mode, or at least run "bindkey ^w
backward-delete-word"