33

This question explains how to reload .inputrc using C-x C-r. But how would one reload it using commands in a bash script?

FMc
  • 493
  • 1
  • 5
  • 9

1 Answers1

39

Use the bind command:

bind -f ~/.inputrc

See help bind for more information:

-f  filename       Read key bindings from FILENAME.
Spooky
  • 428
  • 5
  • 13
cYrus
  • 21,379
  • 8
  • 74
  • 79
  • 2
    This doesn't unbind removed entries. – Sparhawk Oct 18 '15 at 02:52
  • 2
    I am a bit surprised to see that the `-f` option accepts only a **filename**, not a file, which means, for instance, that `bind -f <(cat ~/.inputrc)` has no effect. I run into this while trying to pass a single `set` line to `bind -f`. – Enlico Oct 13 '19 at 09:04