0

In trying to read in my inputrc file, I was reading https://www.gnu.org/software/bash/manual/bashref.html#Miscellaneous-Commands:

re-read-init-file (C-x C-r)
Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.

Is re-read-init-file supposed to be a command I can execute? I am getting

$ re-read-init-file
-bash: re-read-init-file: command not found

I also got the same result with abort.

1 Answer 1

3

No, it's not a command you can type on the command line.

You can invoke it through pressing Ctrl+X followed by Ctrl+R, as the manual shows (assuming the keybindings have not been changed).

The readline functions have names so that you are able to meaningfully bind keyboard shortcuts to them. They are not commands in the sense that they are executables like man.

6
  • Thanks! Although, <kbd>Ctrl+X</kbd> followed by <kbd>Ctrl+R</kbd> didn't seem to do anything...the desired behavior in ~/.inputrc didn't take effect apparently. (Although <kbd>Ctrl+G</kbd> worked in generating an audible alert!) Would you happen to have any pointers on how I can further investigate this?
    – flow2k
    Mar 1, 2018 at 6:40
  • @flow2k That may also depend on what the changes to .inputrc you made. Restarting the shell session will alse re-read the file.
    – Kusalananda
    Mar 1, 2018 at 6:58
  • Restarting the session helped, but the keystrokes are still not working (I reverted the .inputrc and tried several times). My ~/.inputrc is (in case you can spot anything) "\e[A": history-search-backward "\e[B": history-search-forward.
    – flow2k
    Mar 1, 2018 at 7:24
  • What does bind -P show?
    – ErikF
    Mar 1, 2018 at 8:36
  • @ErikF It likely shows that the command is bound to the correct keys (as in my default setup). However, this does not seem to work under all circumstances.
    – Kusalananda
    Mar 1, 2018 at 8:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .