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
  • 234,489
  • 66
  • 447
  • 667
aliteralmind
  • 349
  • 2
  • 10

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
aliteralmind
  • 349
  • 2
  • 10
Arkadiusz Drabczyk
  • 25,049
  • 5
  • 53
  • 68
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,282
  • 8
  • 12
T. Verron
  • 265
  • 1
  • 2
  • 8
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
  • 234,489
  • 66
  • 447
  • 667