18

My ~/.bashrc contains exactly one line:

source my_config/my_actual_bashrc.sh

Is there an equivalent with .inputrc, so my customizations can be in a separate location, and "called" by ~/.inputrc?

terdon
  • 242,166

3 Answers3

26

According to man readline:

$include

This directive takes a single filename as an argument and reads commands and bindings from that file. For example, the following directive would read /etc/inputrc:

$include  /etc/inputrc
6

If you only want to change the location of the file, you can set INPUTRC to my_config/my_actual_inputrc (if unset, defaults to ~/.inputrc).

There is also an equivalent of source, that is $include (source). For example:

$include myconfig/my_actual_inputrc
jwd
  • 1,467
T. Verron
  • 265
5

Another option is to use a link:

ln -s my_config/my_inputrc .inputrc

That will create the file .inputrc as a link pointing to my_config/my_inputrc.

terdon
  • 242,166