Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.