I want to modify the behaviour of 'backward-kill-word' in xterm command line. I'd like to remove "word" defined as space or / only.

For example, if I type

$ tttt/tt t@tt_ttt/ttt

I will get, after calling escape backspace:

$ tttt/tt t@tt_ttt/

Once again:

$ tttt/tt
link|improve this question
feedback

1 Answer

The readline command unix-filename-rubout does exactly that:

Kill the word behind point, using white space and the slash character as the word boundaries. The killed text is saved on the kill-ring.

You just have to bind it to Escape - Backspace. Just add to ~/.inputrc:

"\e\C-?": unix-filename-rubout
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.