>>>>>
p...@gmail.com <
phil.g...@gmail.com> writes:
>>>>> On Jan 20, 7:08 pm, Kaz Kylheku <
k...@kylheku.com> wrote:
[Cc: alt.os.linux, as I believe that the subject being discussed
is more specific to the Linux kernel itself.]
[…]
>> Works for me in bash.
>> bash$ ^C
>> bash$ while true; do : ; done
>> ^C
>> bash$ cat
>> ^C
>> bash$
[…]
> It always worked by default for Bash under Debian and Ubuntu, but now
> I'm on an ancient RedHat box.
It's a somewhat recent change in the Linux kernel's behavior,
controlled by the stty(1)'s echoctl option. IIUC, when the
option was on, the codes used to send a signal were /not/ sent
back ^-encoded, while, e. g., ESC (^[), and thus the functional
keys' codes, etc. were. Now, all the control codes are sent
back ^-encoded when the echoctl option is active.
However, I find this feature mildly annoying. In particular, to
copy a command line from the history into, e. g., a different
Screen window, I use C-r to search the history, then, upon
finding the command, C-c to drop it from the command line (while
still having it displayed at screen.) Now, it works like:
(reverse-i-search)`foo': echo foo bar
and after C-c it becomes:
(reverse-i-search)`foo': echo ^Co bar
$
Thus, I've ended up disabling echoctl completely with:
$ stty -echoctl
As an unfortunate side-effect, when the standard input is echoed
by the kernel, the arrow keys now move the cursor, instead of
producing the familiar ^[[A's, etc.
--
FSF associate member #7257