On 7/9/25 12:21 PM, Vincent Lefevre wrote:
On 2025-07-09 11:40:17 -0400, Chet Ramey wrote:
On 7/9/25 10:56 AM, Vincent Lefevre wrote:
A \C-u setting in the .inputrc file such as
"\C-u": kill-whole-line
is ignored if ^U is the kill character (usual tty settings).
This is controlled by the readline variable `bind-tty-special-chars',
which is enabled by default. It's been that way since bash-3.1, which
was released in 2005.
So, this should be the equivalent of the kill character, i.e.
"erase the current line", which corresponds to kill-whole-line
("Kill all characters on the current line, no matter where
point is"), but this is not what I get.
It isn't, though. The readline equivalent of the stty VKILL character
is `unix-line-discard', which kills characters between point and the
beginning of the line. (That happens to be the default binding for ^U
in both emacs and vi modes).
This is what ^U does in (standalone) vi insert mode. Emacs does something
different with ^U, of course. Since you can't move around the line in
canonical Unix tty input, you're always at the end of the line and there's
no difference in the effect of the two behaviors.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/