Readline Init File Syntax
The GNU Readline library provides the command line on which you type to communicate with bash and some other GNU utilities. It is amazingly configurable, but most people are not aware of this.
Table A-22, emacs Mode Commands, and Table A-24 are a subset of what is available to work with. See the Readline documentation for the full details.
The following is adapted directly from Chet Ramey’s documentation (http://tiswww.tis.case.edu/~chet/readline/readline.html).
You can modify the run-time behavior of Readline by altering the values of variables in Readline using the set command within the init file. The syntax is simple:
set variable value
Here, for example, is how to change from the default Emacs-like key binding to use vi line-editing commands:
set editing-mode vi
Variable names and values, where appropriate, are recognized without regard to case. Unrecognized variable names are ignored.
Boolean variables (those that can be set to on or off) are set to on if the value is null or empty, on (case-insensitive), or 1. Any other value results in the variable being set to off.
Table A-22. Readline configuration settings
Variable | Description |
|---|---|
| Controls what happens when Readline wants to ring the
terminal bell. If set to |
| If set to |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access