Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.