Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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