Tuesday, October 13, 2009

Stupid Visible Ctrl-C

Hmm, I've recently noticed that hitting control-c in bash is showing the ^C in the shell:
root@thistle 1> sleep 10
^C
I don't care too much if it shows up after I've started the command, but I sometimes scroll back in the command history to get a command, and then hit control-c to leave it on the screen without executing it (usually when I want to cut and paste bits of the command). So I don't like this. :(

It seems to be related to a change in the kernel:
http://kerneltrap.org/mailarchive/linux-kernel/2008/8/23/3051834/thread

But you can revert to the old behaviour with "stty -echoctl":
root@thorn 1> sleep 10^C
root@thorn 1> stty -echoctl
root@thorn 2> sleep 10
root@thorn 2>
Yay!

Blog Archive