7

I read in the man page, that you set readline parameters on an off or to a value by using

set var value

Is this the same as the set builtin, and how do you set the variables once inputrc has already been read and the shell is running?

  • And, a note for the record, the readline set is not the same as the shell builtin set. – jw013 Dec 23 '11 at 17:13
7

The set command in the readline manual is the one in readline's configuration file, ~/.inputrc. Although bash is the most famous user of the readline library, the library is generic and can be used by other programs; the syntax of .inputrc is unrelated to bash.

You can make bash execute readline commands through the bind builtin:

bind "set var value"

Also, you can make bash reread ~/.inputrc with bind -f ~/.inputrc.

4

From the manual:

When a program which uses the Readline library starts up, the init file is read, and the key bindings are set.

In addition, the C-x C-r command re-reads this init file1, thus incorporating any changes that you might have made to it.


1 Note this is obviously the Emacs (default) binding, if you use editing-mode-vi there is no default keybind. However, you can bind the re-read-init-file command to a keybind of your choice in ~/.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.