I am trying to change the location of my inputrc. The docs say that it reads the config location from the INPUTRC environment variable
Readline is customized by putting commands in an initialization file (the inputrc file). The name of this file is taken from the value of the INPUTRC environment variable
I exported this variable in my ~/.bash_profile
export INPUTRC="~/.config/readline/inputrc"
and added the following lines to ~/.config/readline/inputrc
$include /etc/inputrc
# Case insensitive tab completion
set completion-ignore-case on
# Single tab partially completes and shows all options
set show-all-if-ambiguous on
# shift + arrows to go back and forth one word at a time
"\e[1;2D": backward-word
"\e[1;2C": forward-word
# Cycle through completions inline
Tab: menu-complete
"\e[Z": menu-complete-backward
Now if i try to open a new bash session, none of these options seem to have taken effect. It works as expected if I put them in ~/.inputrc
with or without the INPUTRC variable exported. I've also tried exporting it from ~/.bashrc
and ~/.profile
, neither has worked.
I could add these lines to my bashrc using bind
but that would mean that other programs that use readline wouldn't share these options.