Chapter 8: Command Line Editing

109

show-all-if-ambiguous

This alters the default behavior of the completion functions. If set to ‘on’, words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell.

The default value is ‘off’. show-all-if-unmodified

This alters the default behavior of the completion functions in a fashion similar to show-all-if-ambiguous. If set to ‘on’, words which have more than one possible completion without any possible par- tial completion (the possible completions don’t share a common prefix) cause the matches to be listed immediately instead of ring- ing the bell. The default value is ‘off’. show-mode-in-prompt

If set to ‘on’, add a character to the beginning of the prompt in- dicating the editing mode: emacs (‘@’), vi command (‘:’), or vi insertion (‘+’). The default value is ‘off’. skip-completed-text

If set to ‘on’, this alters the default completion behavior when in- serting a single match into the line. It’s only active when perform- ing completion in the middle of a word. If enabled, readline does not insert characters from the completion that match characters after point in the word being completed, so portions of the word following the cursor are not duplicated. For instance, if this is en- abled, attempting completion when the cursor is after the ‘e’ in

‘Makefile’ will result in ‘Makefile’ rather than ‘Makefilefile’, assuming there is a single possible completion. The default value is ‘off’. visible-stats

If set to ‘on’, a character denoting a file’s type is appended to the filename when listing possible completions. The default is ‘off’.

Key Bindings

The syntax for controlling key bindings in the init file is simple. First you need to find the name of the command that you want to change. The following sections contain tables of the command name, the default keybinding, if any, and a short description of what the command does.

Once you know the name of the command, simply place on a line in the init file the name of the key you wish to bind the command to, a colon, and then the name of the command. There can be no space between the key name and the colon – that will be interpreted as part of the key name. The name of the key can be expressed in different ways, depending on what you find most comfortable.

In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a macro).