Reputation: 11827
I'd like to configure my shell so that when I do 'option-backspace' then I delete the previous word.
I know I have to put something like
"\eDEL": backward-kill-word
in my .inputrc, but I can't figure out the exact thing that goes on the left. I also cannot figure out where to look this up.
What should I put in my .inputrc?
Upvotes: 0
Views: 212
Reputation: 52162
It should be
"\e\b": backward-kill-word
The syntax is explained in the Bash manual, under Readline Init File.
\b
is the escape for backspace.
Instead of escapes, you should also be able to use key names:
Meta-Rubout: backward-kill-word
Upvotes: 1