I have read a number of answers to similar questions both in this forum and elsewhere, but I cannot make it work for me.
I am trying to remap Ctrl+W to delete the word forward rather than backward. I know that I can use Esc+D do do this, but this is also a learning exercise for me.
Using what I have read, I have added the following in ~/.inputrc
:
$include /etc/inputrc
Control-w: kill-word
- The first line is, apparently, required if I want to include the other bindings.
- For the second, I have tried
Control-w
and"\C-w"
, and for the command, I have triedkill-word
andshell-kill-word
. - To try out the changes I have tried
bind -f ~/.inputrc
, Ctrl+X, Ctrl+R,bash -l
and simply opening up a new terminal.
I assume that I have missed some important step, or simply misunderstood, but I’m running out of ideas.
I am on Centos 8.
Control-W
? – terdon Jul 13 '20 at 09:38^C-w
has answers, but it'd also be great to know where the precedence of terminal driver settings over Readline bindings is documented. – fra-san Jul 13 '20 at 11:40