[Techtalk] bash and inputrc
Akkana Peck
akkana at shallowsky.com
Wed Jan 12 16:34:11 EST 2005
Anybody used .inputrc successfully to change bash's key bindings?
I'm trying to get ^W in bash to delete only back to the last
punctuation mark, like tcsh does, not to the last space:
so that after typing a command like
gimp /long/path/to/filenamethatisreallylong.jpg
and then later deciding that I want to edit otherfilethatisalsolong.jpg,
I can repeat the command with ^P or uparrow, then hit ^W a few times
and not have to count the backspaces all the way back.
(I use this all the time in tcsh and I really miss it in bash.)
The bash man page says that I can change key bindings by creating
a ~/.inputrc file with lines like the following in it:
"C-w": unix-filename-rubout
"C-h": backward-kill-word
(I don't really want to rebind C-h, that's just a test.)
But bash doesn't seem to be reading either .inputrc or /etc/inputrc
at all; at least, nothing I put in these files makes any difference,
whether I run bash with --login or not, and bash -v doesn't mention
anything about that file; the behavior of C-h and C-w doesn't change.
I've tried it with and without the quotes around the key bindings;
I've tried adding "export INPUTRC=$HOME/.inputrc" to .bashrc.
This is on Debian; I've tried both on unstable and stable.
What am I missing?
...Akkana
More information about the Techtalk
mailing list