I have several set commands in .inputrc. Previously I've loaded them via source .inputrc, but some programs are unhappy with set commands in .profile. What is the correct way of sourcing it?


You don't.

See the "INITIALIZATION FILE" section of the readline manual (man readline):

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. If that variable is unset, the default is ~/.inputrc. If that file does not exist or cannot be read, the ultimate default is /etc/inputrc. When a program which uses the readline library starts up, the init file is read, and the key bindings and variables are set.

| improve this answer | |
  • Also Ctrl-x Ctrl-r is bound by default to re-read-init-file so it's not necessary to open new session of the program. – Jakub Jindra Mar 29 '19 at 13:01

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.