I have updated my ~/.inputrc file to test out show-all-if-unmodified
, and now want to try it out. How do I use it without logging off and back in?
1 Answer
You can use readline's re-read-init-file
command, which is typically accessed theough C-x C-r
(that's a Control-X, followed by a separate Control-R), if you use the "emacs" keybindings, which are the default. Note that this works in other readline users that are not bash (for example, the Python interpreter in interactive mode.)
If you use "vi" mode, this command has no keybinding by default, so you might consider adding a keybinding for it, if you consider it useful.
Otherwise, in bash, you can use [the bind
built-in] to reconfigure readline. You can re-read your "inputrc" using the following command in bash:
$ bind -f ~/.inputrc
bind -f ~/.inputrc
. ~/.inputrc
before asking this question, and now readline seems to have stopped working. Weird. Thanks for your answer though, please make it an answer so it can be accepted.