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 |
| The string to insert at the beginning of the line when the insert-comment command is executed. The default value is #. |
| If set to |
| The number of possible completions that determines
when the user is asked whether the list of possibilities should be
displayed. If the number of possible completions is greater than
this value, Readline will ask the user whether he wishes to view
them; otherwise, they are simply listed. This variable must be set
to an integer value greater than or equal to 0. A negative value
means Readline should never ask. The default limit is |
| If set to |
| If set to |
| The editing-mode variable controls which default set
of key bindings is used. By default, Readline starts up in Emacs
editing mode, where the keystrokes are most similar to Emacs. This
variable can be set to either |
| When set to |
| If set to |
| If set to |
| This variable can be set to either |
| If set to |
| The string of characters that should terminate an incremental search without subsequently executing the character as a command. If this variable has not been given a value, the characters Esc and C-J will terminate an incremental search. |
| Sets Readline’s idea of the current keymap for key
binding commands. Acceptable keymap names are |
| If set to |
| This variable, when set to |
| If set to |
| This variable, when set to |
| If set to |
| If set to |
| If set to |
| This alters the default behavior of the completion
functions. If set to |
| This alters the default behavior of the completion
functions in a fashion similar to |
| If set to |
18.226.82.253