control-w deleting word in bash

Posted on 2009-04-08(Wed) in posts

It's always bothered me that control-w in bash doesn't delete a word, it deletes everything until the previous space.

Add this to your ~/.inputrc to make it work:
set bind-tty-special-chars off
"\C-w": backward-kill-word
More description here.