16

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?

20

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
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.