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 use bash and alt+backspace key to delete a word at a time. This works nicely, but for some reason, it stops working after a while. It seems as though it does not recognize the alt key, and simply removes a character at a time.

Btw, I use screen to fork multiple bash instances.

I'd appreciate any solutions or diagnostic suggestions.

Thanks,

share|improve this question

migrated from stackoverflow.com Mar 23 '11 at 13:52

This question came from our site for professional and enthusiast programmers.

    
Does it stop working after you use a specific command? Start a new window? –  qor72 Mar 23 '11 at 13:44

1 Answer 1

If you do:

bind -q backward-kill-word

it should respond with:

backward-kill-word can be invoked via "\e\C-h", "\e\C-?".

If not, you can do one or both of:

bind '"\e\C-h": backward-kill-word'
bind '"\e\C-?": backward-kill-word'

You only need one. You can tell which by pressing Ctrl-v Backspace which will output either ^H or ^?.

You should't need to, but you can add the following to your ~/.inputrc:

"\e\C-h": backward-kill-word
"\e\C-?": backward-kill-word
share|improve this answer

Your Answer

 
discard

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