Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Background (probably wrong)

I have heard that the readline module is reading ~/.inputrc and that is how it changes the behaviour of keystrokes under programs such as bash.

Question

How can I reload this after editing to see the changed behaviour without restarting my terminal program?

share|improve this question
7  
Background (not wrong). –  Dennis Williamson Feb 3 '11 at 16:03
    
Is there a way to call Readline to reload the history? Like xmonad ----recompile && xmonad --restart for reloading XMonad? –  Ehtesh Choudhury Apr 19 '12 at 0:56
    
I came here looking for how to load .inputrc with a command. superuser.com/q/419670/56544 –  dfrankow Feb 22 '13 at 17:23

2 Answers 2

up vote 28 down vote accepted

By default, C-x C-r is bound to re-read-init-file.

See the Bash Reference Manual for explanation.

share|improve this answer
    
This doesn't work for me. I tried a different mapping in the .inputrc file and also no luck: "\eX\eR": re-read-init-file Any suggestions? –  Captain Lepton Feb 8 '11 at 12:36
2  
@Captain Actually, it does, except it does not clear keystrokes that were deleted in the meantime. If you e.g. add some, they are loaded. Your only solution for these is a new bash -l (shell that behaves like a login shell) that is freshly initialized. –  Daniel Beck Apr 25 '11 at 10:45

In .inputrc first choose your binding and after bind the re-read-init-file function:

set editing-mode vi
"\C-x\C-r": re-read-init-file

Press CTRL and x, release both, press CTRL and r.

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.