summaryrefslogtreecommitdiff
path: root/doc/readline.0
diff options
context:
space:
mode:
Diffstat (limited to 'doc/readline.0')
-rw-r--r--doc/readline.0252
1 files changed, 146 insertions, 106 deletions
diff --git a/doc/readline.0 b/doc/readline.0
index 854c5bb..3654f6f 100644
--- a/doc/readline.0
+++ b/doc/readline.0
@@ -245,169 +245,173 @@ READLINE(3) Library Functions Manual READLINE(3)
Controls whether readline begins with a set of key bindings sim-
ilar to Emacs or vi. editing-mode can be set to either emacs or
vi.
+ emacs-mode-string (@)
+ If the show-mode-in-prompt variable is enabled, this string is
+ displayed immediately before the last line of the primary prompt
+ when emacs editing mode is active. The value is expanded like a
+ key binding, so the standard set of meta- and control prefixes
+ and backslash escape sequences is available. Use the \1 and \2
+ escapes to begin and end sequences of non-printing characters,
+ which can be used to embed a terminal control sequence into the
+ mode string.
enable-bracketed-paste (Off)
- When set to On, readline will configure the terminal in a way
+ When set to On, readline will configure the terminal in a way
that will enable it to insert each paste into the editing buffer
as a single string of characters, instead of treating each char-
- acter as if it had been read from the keyboard. This can pre-
- vent pasted characters from being interpreted as editing com-
+ acter as if it had been read from the keyboard. This can pre-
+ vent pasted characters from being interpreted as editing com-
mands.
enable-keypad (Off)
When set to On, readline will try to enable the application key-
- pad when it is called. Some systems need this to enable the
+ pad when it is called. Some systems need this to enable the
arrow keys.
enable-meta-key (On)
- When set to On, readline will try to enable any meta modifier
- key the terminal claims to support when it is called. On many
+ When set to On, readline will try to enable any meta modifier
+ key the terminal claims to support when it is called. On many
terminals, the meta key is used to send eight-bit characters.
expand-tilde (Off)
- If set to On, tilde expansion is performed when readline
+ If set to On, tilde expansion is performed when readline
attempts word completion.
history-preserve-point (Off)
- If set to On, the history code attempts to place point at the
- same location on each history line retrieved with previous-his-
+ If set to On, the history code attempts to place point at the
+ same location on each history line retrieved with previous-his-
tory or next-history.
history-size (unset)
- Set the maximum number of history entries saved in the history
- list. If set to zero, any existing history entries are deleted
+ Set the maximum number of history entries saved in the history
+ list. If set to zero, any existing history entries are deleted
and no new entries are saved. If set to a value less than zero,
- the number of history entries is not limited. By default, the
+ the number of history entries is not limited. By default, the
number of history entries is not limited. If an attempt is made
- to set history-size to a non-numeric value, the maximum number
+ to set history-size to a non-numeric value, the maximum number
of history entries will be set to 500.
horizontal-scroll-mode (Off)
- When set to On, makes readline use a single line for display,
+ When set to On, makes readline use a single line for display,
scrolling the input horizontally on a single screen line when it
- becomes longer than the screen width rather than wrapping to a
+ becomes longer than the screen width rather than wrapping to a
new line.
input-meta (Off)
- If set to On, readline will enable eight-bit input (that is, it
- will not clear the eighth bit in the characters it reads),
+ If set to On, readline will enable eight-bit input (that is, it
+ will not clear the eighth bit in the characters it reads),
regardless of what the terminal claims it can support. The name
- meta-flag is a synonym for this variable. The default is Off,
- but readline will set it to On if the locale contains eight-bit
+ meta-flag is a synonym for this variable. The default is Off,
+ but readline will set it to On if the locale contains eight-bit
characters.
isearch-terminators (``C-[ C-J'')
- The string of characters that should terminate an incremental
- search without subsequently executing the character as a com-
- mand. If this variable has not been given a value, the charac-
+ The string of characters that should terminate an incremental
+ search without subsequently executing the character as a com-
+ mand. If this variable has not been given a value, the charac-
ters ESC and C-J will terminate an incremental search.
keymap (emacs)
- Set the current readline keymap. The set of legal keymap names
- is emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,
- vi-command, and vi-insert. vi is equivalent to vi-command;
- emacs is equivalent to emacs-standard. The default value is
- emacs. The value of editing-mode also affects the default
+ Set the current readline keymap. The set of legal keymap names
+ is emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,
+ vi-command, and vi-insert. vi is equivalent to vi-command;
+ emacs is equivalent to emacs-standard. The default value is
+ emacs. The value of editing-mode also affects the default
keymap.
- emacs-mode-string (@)
- This string is displayed immediately before the last line of the
- primary prompt when emacs editing mode is active. The value is
- expanded like a key binding, so the standard set of meta- and
- control prefixes and backslash escape sequences is available.
- Use the \1 and \2 escapes to begin and end sequences of non-
- printing characters, which can be used to embed a terminal con-
- trol sequence into the mode string.
keyseq-timeout (500)
- Specifies the duration readline will wait for a character when
- reading an ambiguous key sequence (one that can form a complete
+ Specifies the duration readline will wait for a character when
+ reading an ambiguous key sequence (one that can form a complete
key sequence using the input read so far, or can take additional
- input to complete a longer key sequence). If no input is
- received within the timeout, readline will use the shorter but
- complete key sequence. The value is specified in milliseconds,
- so a value of 1000 means that readline will wait one second for
- additional input. If this variable is set to a value less than
- or equal to zero, or to a non-numeric value, readline will wait
- until another key is pressed to decide which key sequence to
+ input to complete a longer key sequence). If no input is
+ received within the timeout, readline will use the shorter but
+ complete key sequence. The value is specified in milliseconds,
+ so a value of 1000 means that readline will wait one second for
+ additional input. If this variable is set to a value less than
+ or equal to zero, or to a non-numeric value, readline will wait
+ until another key is pressed to decide which key sequence to
complete.
mark-directories (On)
If set to On, completed directory names have a slash appended.
mark-modified-lines (Off)
- If set to On, history lines that have been modified are dis-
+ If set to On, history lines that have been modified are dis-
played with a preceding asterisk (*).
mark-symlinked-directories (Off)
If set to On, completed names which are symbolic links to direc-
- tories have a slash appended (subject to the value of
+ tories have a slash appended (subject to the value of
mark-directories).
match-hidden-files (On)
- This variable, when set to On, causes readline to match files
- whose names begin with a `.' (hidden files) when performing
- filename completion. If set to Off, the leading `.' must be
+ This variable, when set to On, causes readline to match files
+ whose names begin with a `.' (hidden files) when performing
+ filename completion. If set to Off, the leading `.' must be
supplied by the user in the filename to be completed.
menu-complete-display-prefix (Off)
- If set to On, menu completion displays the common prefix of the
+ If set to On, menu completion displays the common prefix of the
list of possible completions (which may be empty) before cycling
through the list.
output-meta (Off)
- If set to On, readline will display characters with the eighth
+ If set to On, readline will display characters with the eighth
bit set directly rather than as a meta-prefixed escape sequence.
The default is Off, but readline will set it to On if the locale
contains eight-bit characters.
page-completions (On)
- If set to On, readline uses an internal more-like pager to dis-
+ If set to On, readline uses an internal more-like pager to dis-
play a screenful of possible completions at a time.
print-completions-horizontally (Off)
- If set to On, readline will display completions with matches
- sorted horizontally in alphabetical order, rather than down the
+ If set to On, readline will display completions with matches
+ sorted horizontally in alphabetical order, rather than down the
screen.
revert-all-at-newline (Off)
- If set to On, readline will undo all changes to history lines
+ If set to On, readline will undo all changes to history lines
before returning when accept-line is executed. By default, his-
- tory lines may be modified and retain individual undo lists
+ tory lines may be modified and retain individual undo lists
across calls to readline.
show-all-if-ambiguous (Off)
- This alters the default behavior of the completion functions.
+ 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
+ cause the matches to be listed immediately instead of ringing
the bell.
show-all-if-unmodified (Off)
- This alters the default behavior of the completion functions in
+ 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 possi-
- ble partial completion (the possible completions don't share a
- common prefix) cause the matches to be listed immediately
+ which have more than one possible completion without any possi-
+ ble partial completion (the possible completions don't share a
+ common prefix) cause the matches to be listed immediately
instead of ringing the bell.
show-mode-in-prompt (Off)
- If set to On, add a character to the beginning of the prompt
- indicating the editing mode: emacs, vi command, or vi insertion.
- The mode strings are user-settable.
+ If set to On, add a string to the beginning of the prompt indi-
+ cating the editing mode: emacs, vi command, or vi insertion.
+ The mode strings are user-settable (e.g., emacs-mode-string).
skip-completed-text (Off)
- If set to On, this alters the default completion behavior when
- inserting a single match into the line. It's only active when
- performing 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
+ If set to On, this alters the default completion behavior when
+ inserting a single match into the line. It's only active when
+ performing 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.
vi-cmd-mode-string ((cmd))
- This string is displayed immediately before the last line of the
- primary prompt when vi editing mode is active and in command
- mode. The value is expanded like a key binding, so the standard
- set of meta- and control prefixes and backslash escape sequences
- is available. Use the \1 and \2 escapes to begin and end
- sequences of non-printing characters, which can be used to embed
- a terminal control sequence into the mode string.
+ If the show-mode-in-prompt variable is enabled, this string is
+ displayed immediately before the last line of the primary prompt
+ when vi editing mode is active and in command mode. The value
+ is expanded like a key binding, so the standard set of meta- and
+ control prefixes and backslash escape sequences is available.
+ Use the \1 and \2 escapes to begin and end sequences of non-
+ printing characters, which can be used to embed a terminal con-
+ trol sequence into the mode string.
vi-ins-mode-string ((ins))
- This string is displayed immediately before the last line of the
- primary prompt when vi editing mode is active and in insertion
- mode. The value is expanded like a key binding, so the standard
- set of meta- and control prefixes and backslash escape sequences
- is available. Use the \1 and \2 escapes to begin and end
- sequences of non-printing characters, which can be used to embed
- a terminal control sequence into the mode string.
+ If the show-mode-in-prompt variable is enabled, this string is
+ displayed immediately before the last line of the primary prompt
+ when vi editing mode is active and in insertion mode. The value
+ is expanded like a key binding, so the standard set of meta- and
+ control prefixes and backslash escape sequences is available.
+ Use the \1 and \2 escapes to begin and end sequences of non-
+ printing characters, which can be used to embed a terminal con-
+ trol sequence into the mode string.
visible-stats (Off)
- If set to On, a character denoting a file's type as reported by
- stat(2) is appended to the filename when listing possible com-
+ If set to On, a character denoting a file's type as reported by
+ stat(2) is appended to the filename when listing possible com-
pletions.
Conditional Constructs
- Readline implements a facility similar in spirit to the conditional
- compilation features of the C preprocessor which allows key bindings
- and variable settings to be performed as the result of tests. There
+ Readline implements a facility similar in spirit to the conditional
+ compilation features of the C preprocessor which allows key bindings
+ and variable settings to be performed as the result of tests. There
are four parser directives used.
- $if The $if construct allows bindings to be made based on the edit-
- ing mode, the terminal being used, or the application using
- readline. The text of the test extends to the end of the line;
- no characters are required to isolate it.
+ $if The $if construct allows bindings to be made based on the edit-
+ ing mode, the terminal being used, or the application using
+ readline. The text of the test, after any comparison operator,
+ extends to the end of the line; unless otherwise noted, no char-
+ acters are required to isolate it.
mode The mode= form of the $if directive is used to test
whether readline is in emacs or vi mode. This may be
@@ -424,14 +428,26 @@ READLINE(3) Library Functions Manual READLINE(3)
This allows sun to match both sun and sun-cmd, for
instance.
+ version
+ The version test may be used to perform comparisons
+ against specific readline versions. The version expands
+ to the current readline version. The set of comparison
+ operators includes =, (and ==), !=, <=, >=, <, and >.
+ The version number supplied on the right side of the
+ operator consists of a major version number, an optional
+ decimal point, and an optional minor version (e.g., 7.1).
+ If the minor version is omitted, it is assumed to be 0.
+ The operator may be separated from the string version and
+ from the version number argument by whitespace.
+
application
The application construct is used to include application-
specific settings. Each program using the readline
- library sets the application name, and an initialization
+ library sets the application name, and an initialization
file can test for a particular value. This could be used
- to bind key sequences to functions useful for a specific
- program. For instance, the following command adds a key
- sequence that quotes the current or previous word in
+ to bind key sequences to functions useful for a specific
+ program. For instance, the following command adds a key
+ sequence that quotes the current or previous word in
bash:
$if Bash
@@ -439,6 +455,16 @@ READLINE(3) Library Functions Manual READLINE(3)
"\C-xq": "\eb\"\ef\""
$endif
+ variable
+ The variable construct provides simple equality tests for
+ readline variables and values. The permitted comparison
+ operators are =, ==, and !=. The variable name must be
+ separated from the comparison operator by whitespace; the
+ operator may be separated from the value on the right
+ hand side by whitespace. Both string and boolean vari-
+ ables may be tested. Boolean variables must be tested
+ against the values on and off.
+
$endif This command, as seen in the previous example, terminates an $if
command.
@@ -509,6 +535,18 @@ READLINE(3) Library Functions Manual READLINE(3)
backward-word (M-b)
Move back to the start of the current or previous word. Words
are composed of alphanumeric characters (letters and digits).
+ previous-screen-line
+ Attempt to move point to the same physical screen column on the
+ previous physical screen line. This will not have the desired
+ effect if the current Readline line does not take up more than
+ one physical line or if point is not greater than the length of
+ the prompt plus the screen width.
+ next-screen-line
+ Attempt to move point to the same physical screen column on the
+ next physical screen line. This will not have the desired effect
+ if the current Readline line does not take up more than one
+ physical line or if the length of the current Readline line is
+ not greater than the length of the prompt plus the screen width.
clear-screen (C-l)
Clear the screen leaving the current line at the top of the
screen. With an argument, refresh the current line without
@@ -752,20 +790,22 @@ READLINE(3) Library Functions Manual READLINE(3)
and store the definition.
call-last-kbd-macro (C-x e)
Re-execute the last keyboard macro defined, by making the char-
- acters in the macro appear as if typed at the keyboard.
- print-last-kbd-macro () Print the last keyboard macro defined in
- a format suitable for the inputrc file.
+ acters in the macro appear as if typed at the keyboard.
+ print-last-kbd-macro ()
+ Print the last keyboard macro defined in a format suitable for
+ the inputrc file.
Miscellaneous
re-read-init-file (C-x C-r)
- Read in the contents of the inputrc file, and incorporate any
+ Read in the contents of the inputrc file, and incorporate any
bindings or variable assignments found there.
abort (C-g)
- Abort the current editing command and ring the terminal's bell
+ Abort the current editing command and ring the terminal's bell
(subject to the setting of bell-style).
- do-uppercase-version (M-a, M-b, M-x, ...)
- If the metafied character x is lowercase, run the command that
- is bound to the corresponding uppercase character.
+ do-lowercase-version (M-A, M-B, M-x, ...)
+ If the metafied character x is uppercase, run the command that
+ is bound to the corresponding metafied lowercase character. The
+ behavior is undefined if x is already lowercase.
prefix-meta (ESC)
Metafy the next character typed. ESC f is equivalent to Meta-f.
undo (C-_, C-x C-u)
@@ -1076,4 +1116,4 @@ READLINE(3) Library Functions Manual READLINE(3)
-GNU Readline 7.0 2016 February 28 READLINE(3)
+GNU Readline 7.0 2017 December 28 READLINE(3)