I use Meta-ijkl as arrows in Emacs, and M-;
as a backspace, so I want to make the keys in bash represent the same style. Moving and deleting works well, but for some reason I cannot bind unix-line-discard
to C-;
that would erase the whole line from the cursor to the beginning into the kill buffer. Since default emacs keys for copy, kill and yank are C-j
, C-k
and C-y
, another C- combination fits there quite well. And \e:
(Meta-Shift-;) is already bound to backward-kill-word
. C-u
that does unix-line-discard
by default, works fine, but it’s inconvenient to press. If I rebind this function to, say, \C-g
, it works fine, too.
In the ~/.inputrc
I have
"\C-;": unix-line-discard
I’ve also tried
"\C-\;": unix-line-discard
"\C-\x3b": unix-line-discard
with no effect. C-v C-;
in the shell doesn’t print anything except for the usual semicolon, and \C-;
with all its variants only prints it, too, and nothing more.
I work in Urxvt.
;
.\C-\x1b
or\C-[1;2P
.