Contents|Index|Previous|Next
Readline init syntax

The following documentation discusses the Readline init syntax. There are only four constructs allowed in the ‘˜/.inputrc’ file.

Variable settings

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 following discusssion explains how to change from the default Emacs-like key binding to use vi line editing commands:

A great deal of run-time behavior is changeable with the following variables. Key bindings

The syntax for controlling keybindings in the ‘˜/.inputrc’ file is simple. First you have to know the name of the command that you want to change. The following pages contain tables of the command name, the default keybinding, and a short description of what the command does.

Once you know the name of the command, simply place the name of the key you wish to bind the command to, a colon, and then the name of the command on a line in the ‘˜/.inputrc’ file. The name of the key can be expressed in different ways, depending on which is most comfortable for you.

keyname is the name of a key spelled out in English. For example: In the example, C-U is bound to the function, universal-argument, and C-O is bound to run the macro expressed on the right hand side (that is, to insert the text ‘>&output’ into the line). GNU Emacs style key escapes can be used, as in the following example:
  In the example, C-u is bound to the function universal-argument (just as it was in the first example), C-x, C-r is bound to the function reread-init-file, and Esc-[, 1, 1, ˜ is bound to insert the text ‘Function Key 1’.

Commands for moving

Commands for manipulating the history Commands for changing text Killing and yanking Specifying numeric arguments
Top|Contents|Index|Previous|Next