From: Koichi Murase
Subject: Re: Exiting the "read" builtin with trapped ^C
Date: Mon, 22 Jun 2026 23:45:40 +0900
>I agree with Greg that it is better to avoid binding the "skip input"
>operation to Ctrl-c. However, if you want to, you can set "stty intr
>undef" to receive the raw ^C character, and process ^C with the
>keybindings. Attached is an example implementation.
That is certainly interesting, but it doesn't fit my use case and is
obviously more complicated than this ought to be (*).
My main question is more of a "why": Why does it not work the way it
should? Why is ^C ignored when inside a "read" ?
(*) And quite a bit more complicated than my original posted solution.
=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.
When responding to my posts, please try to refrain from giving bureaucratic
answers. If you have nothing useful to say, then just click Next and go on.