Binding backward-kill-word to Ctrl+w

Posted by nocturnal on Super User See other posts from Super User or by nocturnal
Published on 2010-11-18T20:12:08Z Indexed on 2011/06/24 0:25 UTC
Read the original article Hit count: 198

Filed under:
|

I'm trying to switch from prolonged use of Tcsh to recent exploration of Bash.

I've managed to port over all my favorite features, except for Ctrl+w which treats spaces and slashes as word boundaries, most likely backward-kill-word. In Bash however readline deletes all the way to the first space, deleting all slashes between.

I've tried many various combinations of \C-w: backward-kill-word in both .inputrc and .bashrc using bind but I can't get it to work the way I want.

Funny enough, through Putty from Windows at work I can use Alt+Backspace, which also the manual says is the default binding, to produce the exact behavior I want. But in Terminal.app on my Macs at home this does not work. Same goes for any FreeBSD or Linux server I happen to be logged into from Terminal.app.

So I turn to superuser for help.

© Super User or respective owner

Related posts about bash

Related posts about readline