summaryrefslogtreecommitdiff
path: root/doc/readline.0
diff options
context:
space:
mode:
Diffstat (limited to 'doc/readline.0')
-rw-r--r--doc/readline.0223
1 files changed, 111 insertions, 112 deletions
diff --git a/doc/readline.0 b/doc/readline.0
index d0f6fe0..6a11720 100644
--- a/doc/readline.0
+++ b/doc/readline.0
@@ -18,10 +18,10 @@ READLINE(3) Library Functions Manual READLINE(3)
DESCRIPTION
readline will read a line from the terminal and return it, using prompt
- as a prompt. If prompt is NULL or the empty string, no prompt is
- issued. The line returned is allocated with malloc(3); the caller must
- free it when finished. The line returned has the final newline
- removed, so only the text of the line remains.
+ as a prompt. If prompt is NULL or the empty string, no prompt is is-
+ sued. The line returned is allocated with malloc(3); the caller must
+ free it when finished. The line returned has the final newline re-
+ moved, so only the text of the line remains.
readline offers editing capabilities while the user is entering the
line. By default, the line editing commands are similar to those of
@@ -62,8 +62,8 @@ READLINE(3) Library Functions Manual READLINE(3)
INITIALIZATION FILE
Readline is customized by putting commands in an initialization file
(the inputrc file). The name of this file is taken from the value of
- the INPUTRC environment variable. If that variable is unset, the
- default is ~/.inputrc. If that file does not exist or cannot be read,
+ the INPUTRC environment variable. If that variable is unset, the de-
+ fault is ~/.inputrc. If that file does not exist or cannot be read,
the ultimate default is /etc/inputrc. When a program which uses the
readline library starts up, the init file is read, and the key bindings
and variables are set. There are only a few basic constructs allowed
@@ -263,15 +263,15 @@ READLINE(3) Library Functions Manual READLINE(3)
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
- arrow keys.
+ pad when it is called. Some systems need this to enable the ar-
+ row 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
terminals, the meta key is used to send eight-bit characters.
expand-tilde (Off)
- If set to On, tilde expansion is performed when readline
- attempts word completion.
+ If set to On, tilde expansion is performed when readline at-
+ tempts 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-
@@ -291,8 +291,8 @@ READLINE(3) Library Functions Manual READLINE(3)
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),
- regardless of what the terminal claims it can support. The name
+ will not clear the eighth bit in the characters it reads), re-
+ gardless 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
characters.
@@ -312,8 +312,8 @@ READLINE(3) Library Functions Manual READLINE(3)
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
+ input to complete a longer key sequence). If no input is re-
+ ceived 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
@@ -327,8 +327,8 @@ READLINE(3) Library Functions Manual READLINE(3)
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
- mark-directories).
+ tories have a slash appended (subject to the value of mark-di-
+ rectories).
match-hidden-files (On)
This variable, when set to On, causes readline to match files
whose names begin with a `.' (hidden files) when performing
@@ -365,8 +365,8 @@ READLINE(3) Library Functions Manual READLINE(3)
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
- instead of ringing the bell.
+ common prefix) cause the matches to be listed immediately in-
+ stead of ringing the bell.
show-mode-in-prompt (Off)
If set to On, add a string to the beginning of the prompt indi-
cating the editing mode: emacs, vi command, or vi insertion.
@@ -415,26 +415,26 @@ READLINE(3) Library Functions Manual READLINE(3)
mode The mode= form of the $if directive is used to test
whether readline is in emacs or vi mode. This may be
- used in conjunction with the set keymap command, for
- instance, to set bindings in the emacs-standard and
- emacs-ctlx keymaps only if readline is starting out in
- emacs mode.
+ used in conjunction with the set keymap command, for in-
+ stance, to set bindings in the emacs-standard and emacs-
+ ctlx keymaps only if readline is starting out in emacs
+ mode.
term The term= form may be used to include terminal-specific
key bindings, perhaps to bind the key sequences output by
the terminal's function keys. The word on the right side
of the = is tested against the full name of the terminal
and the portion of the terminal name before the first -.
- This allows sun to match both sun and sun-cmd, for
- instance.
+ This allows sun to match both sun and sun-cmd, for in-
+ stance.
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
+ The version number supplied on the right side of the op-
+ erator 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
@@ -442,8 +442,8 @@ READLINE(3) Library Functions Manual READLINE(3)
application
The application construct is used to include application-
- specific settings. Each program using the readline
- library sets the application name, and an initialization
+ specific settings. Each program using the readline li-
+ brary 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
@@ -517,8 +517,8 @@ READLINE(3) Library Functions Manual READLINE(3)
In the following descriptions, point refers to the current cursor posi-
tion, and mark refers to a cursor position saved by the set-mark com-
- mand. The text between the point and mark is referred to as the
- region.
+ mand. The text between the point and mark is referred to as the re-
+ gion.
Commands for Moving
beginning-of-line (C-a)
@@ -557,8 +557,8 @@ READLINE(3) Library Functions Manual READLINE(3)
Commands for Manipulating the History
accept-line (Newline, Return)
Accept the line regardless of where the cursor is. If this line
- is non-empty, it may be added to the history list for future
- recall with add_history(). If the line is a modified history
+ is non-empty, it may be added to the history list for future re-
+ call with add_history(). If the line is a modified history
line, the history line is restored to its original state.
previous-history (C-p)
Fetch the previous command from the history list, moving back in
@@ -588,9 +588,9 @@ READLINE(3) Library Functions Manual READLINE(3)
search for a string supplied by the user.
history-search-backward
Search backward through the history for the string of characters
- between the start of the current line and the current cursor
- position (the point). The search string must match at the
- beginning of a history line. This is a non-incremental search.
+ between the start of the current line and the current cursor po-
+ sition (the point). The search string must match at the begin-
+ ning of a history line. This is a non-incremental search.
history-search-forward
Search forward through the history for the string of characters
between the start of the current line and the point. The search
@@ -598,20 +598,20 @@ READLINE(3) Library Functions Manual READLINE(3)
non-incremental search.
history-substring-search-backward
Search backward through the history for the string of characters
- between the start of the current line and the current cursor
- position (the point). The search string may match anywhere in a
+ between the start of the current line and the current cursor po-
+ sition (the point). The search string may match anywhere in a
history line. This is a non-incremental search.
history-substring-search-forward
Search forward through the history for the string of characters
between the start of the current line and the point. The search
- string may match anywhere in a history line. This is a non-
- incremental search.
+ string may match anywhere in a history line. This is a non-in-
+ cremental search.
yank-nth-arg (M-C-y)
Insert the first argument to the previous command (usually the
second word on the previous line) at point. With an argument n,
insert the nth word from the previous command (the words in the
- previous command begin with word 0). A negative argument
- inserts the nth word from the end of the previous command. Once
+ previous command begin with word 0). A negative argument in-
+ serts the nth word from the end of the previous command. Once
the argument n is computed, the argument is extracted as if the
"!n" history expansion had been specified.
yank-last-arg (M-., M-_)
@@ -661,14 +661,14 @@ READLINE(3) Library Functions Manual READLINE(3)
point over that word as well. If point is at the end of the
line, this transposes the last two words on the line.
upcase-word (M-u)
- Uppercase the current (or following) word. With a negative
- argument, uppercase the previous word, but do not move point.
+ Uppercase the current (or following) word. With a negative ar-
+ gument, uppercase the previous word, but do not move point.
downcase-word (M-l)
- Lowercase the current (or following) word. With a negative
- argument, lowercase the previous word, but do not move point.
+ Lowercase the current (or following) word. With a negative ar-
+ gument, lowercase the previous word, but do not move point.
capitalize-word (M-c)
- Capitalize the current (or following) word. With a negative
- argument, capitalize the previous word, but do not move point.
+ Capitalize the current (or following) word. With a negative ar-
+ gument, capitalize the previous word, but do not move point.
overwrite-mode
Toggle overwrite mode. With an explicit positive numeric argu-
ment, switches to overwrite mode. With an explicit non-positive
@@ -732,19 +732,19 @@ READLINE(3) Library Functions Manual READLINE(3)
This is another way to specify an argument. If this command is
followed by one or more digits, optionally with a leading minus
sign, those digits define the argument. If the command is fol-
- lowed by digits, executing universal-argument again ends the
- numeric argument, but is otherwise ignored. As a special case,
- if this command is immediately followed by a character that is
- neither a digit or minus sign, the argument count for the next
- command is multiplied by four. The argument count is initially
+ lowed by digits, executing universal-argument again ends the nu-
+ meric argument, but is otherwise ignored. As a special case, if
+ this command is immediately followed by a character that is nei-
+ ther a digit or minus sign, the argument count for the next com-
+ mand is multiplied by four. The argument count is initially
one, so executing this function the first time makes the argu-
ment count four, a second time makes the argument count sixteen,
and so on.
Completing
complete (TAB)
- Attempt to perform completion on the text before point. The
- actual completion performed is application-specific. Bash, for
+ Attempt to perform completion on the text before point. The ac-
+ tual completion performed is application-specific. Bash, for
instance, attempts completion treating the text as a variable
(if the text begins with $), username (if the text begins with
~), hostname (if the text begins with @), or command (including
@@ -768,42 +768,41 @@ READLINE(3) Library Functions Manual READLINE(3)
completions, inserting each match in turn. At the end of the
list of completions, the bell is rung (subject to the setting of
bell-style) and the original text is restored. An argument of n
- moves n positions forward in the list of matches; a negative
- argument may be used to move backward through the list. This
- command is intended to be bound to TAB, but is unbound by
- default.
+ moves n positions forward in the list of matches; a negative ar-
+ gument may be used to move backward through the list. This com-
+ mand is intended to be bound to TAB, but is unbound by default.
menu-complete-backward
- Identical to menu-complete, but moves backward through the list
- of possible completions, as if menu-complete had been given a
+ Identical to menu-complete, but moves backward through the list
+ of possible completions, as if menu-complete had been given a
negative argument. This command is unbound by default.
delete-char-or-list
- Deletes the character under the cursor if not at the beginning
- or end of the line (like delete-char). If at the end of the
+ Deletes the character under the cursor if not at the beginning
+ or end of the line (like delete-char). If at the end of the
line, behaves identically to possible-completions.
Keyboard Macros
start-kbd-macro (C-x ()
- Begin saving the characters typed into the current keyboard
+ Begin saving the characters typed into the current keyboard
macro.
end-kbd-macro (C-x ))
Stop saving the characters typed into the current keyboard macro
and store the definition.
call-last-kbd-macro (C-x e)
- Re-execute the last keyboard macro defined, by making the char-
+ 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
+ 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-lowercase-version (M-A, M-B, M-x, ...)
- If the metafied character x is uppercase, run the command that
+ 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)
@@ -811,80 +810,80 @@ READLINE(3) Library Functions Manual READLINE(3)
undo (C-_, C-x C-u)
Incremental undo, separately remembered for each line.
revert-line (M-r)
- Undo all changes made to this line. This is like executing the
- undo command enough times to return the line to its initial
+ Undo all changes made to this line. This is like executing the
+ undo command enough times to return the line to its initial
state.
tilde-expand (M-&)
Perform tilde expansion on the current word.
set-mark (C-@, M-<space>)
- Set the mark to the point. If a numeric argument is supplied,
+ Set the mark to the point. If a numeric argument is supplied,
the mark is set to that position.
exchange-point-and-mark (C-x C-x)
- Swap the point with the mark. The current cursor position is
- set to the saved position, and the old cursor position is saved
+ Swap the point with the mark. The current cursor position is
+ set to the saved position, and the old cursor position is saved
as the mark.
character-search (C-])
A character is read and point is moved to the next occurrence of
- that character. A negative count searches for previous occur-
+ that character. A negative count searches for previous occur-
rences.
character-search-backward (M-C-])
- A character is read and point is moved to the previous occur-
- rence of that character. A negative count searches for subse-
+ A character is read and point is moved to the previous occur-
+ rence of that character. A negative count searches for subse-
quent occurrences.
skip-csi-sequence
- Read enough characters to consume a multi-key sequence such as
- those defined for keys like Home and End. Such sequences begin
+ Read enough characters to consume a multi-key sequence such as
+ those defined for keys like Home and End. Such sequences begin
with a Control Sequence Indicator (CSI), usually ESC-[. If this
- sequence is bound to "\[", keys producing such sequences will
- have no effect unless explicitly bound to a readline command,
- instead of inserting stray characters into the editing buffer.
+ sequence is bound to "\[", keys producing such sequences will
+ have no effect unless explicitly bound to a readline command,
+ instead of inserting stray characters into the editing buffer.
This is unbound by default, but usually bound to ESC-[.
insert-comment (M-#)
- Without a numeric argument, the value of the readline com-
- ment-begin variable is inserted at the beginning of the current
+ Without a numeric argument, the value of the readline com-
+ ment-begin variable is inserted at the beginning of the current
line. If a numeric argument is supplied, this command acts as a
- toggle: if the characters at the beginning of the line do not
- match the value of comment-begin, the value is inserted, other-
+ toggle: if the characters at the beginning of the line do not
+ match the value of comment-begin, the value is inserted, other-
wise the characters in comment-begin are deleted from the begin-
- ning of the line. In either case, the line is accepted as if a
- newline had been typed. The default value of comment-begin
- makes the current line a shell comment. If a numeric argument
- causes the comment character to be removed, the line will be
- executed by the shell.
+ ning of the line. In either case, the line is accepted as if a
+ newline had been typed. The default value of comment-begin
+ makes the current line a shell comment. If a numeric argument
+ causes the comment character to be removed, the line will be ex-
+ ecuted by the shell.
dump-functions
- Print all of the functions and their key bindings to the read-
+ Print all of the functions and their key bindings to the read-
line output stream. If a numeric argument is supplied, the out-
- put is formatted in such a way that it can be made part of an
+ put is formatted in such a way that it can be made part of an
inputrc file.
dump-variables
- Print all of the settable variables and their values to the
- readline output stream. If a numeric argument is supplied, the
+ Print all of the settable variables and their values to the
+ readline output stream. If a numeric argument is supplied, the
output is formatted in such a way that it can be made part of an
inputrc file.
dump-macros
- Print all of the readline key sequences bound to macros and the
- strings they output. If a numeric argument is supplied, the
+ Print all of the readline key sequences bound to macros and the
+ strings they output. If a numeric argument is supplied, the
output is formatted in such a way that it can be made part of an
inputrc file.
emacs-editing-mode (C-e)
- When in vi command mode, this causes a switch to emacs editing
+ When in vi command mode, this causes a switch to emacs editing
mode.
vi-editing-mode (M-C-j)
- When in emacs editing mode, this causes a switch to vi editing
+ When in emacs editing mode, this causes a switch to vi editing
mode.
DEFAULT KEY BINDINGS
- The following is a list of the default emacs and vi bindings. Charac-
- ters with the eighth bit set are written as M-<character>, and are
- referred to as metafied characters. The printable ASCII characters not
- mentioned in the list of emacs standard bindings are bound to the
- self-insert function, which just inserts the given character into the
+ The following is a list of the default emacs and vi bindings. Charac-
+ ters with the eighth bit set are written as M-<character>, and are re-
+ ferred to as metafied characters. The printable ASCII characters not
+ mentioned in the list of emacs standard bindings are bound to the
+ self-insert function, which just inserts the given character into the
input line. In vi insertion mode, all characters not specifically men-
tioned are bound to self-insert. Characters assigned to signal genera-
tion by stty(1) or the terminal driver, such as C-Z or C-C, retain that
- function. Upper and lower case metafied characters are bound to the
- same function in the emacs mode meta keymap. The remaining characters
- are unbound, which causes readline to ring the bell (subject to the
+ function. Upper and lower case metafied characters are bound to the
+ same function in the emacs mode meta keymap. The remaining characters
+ are unbound, which causes readline to ring the bell (subject to the
setting of the bell-style variable).
Emacs Mode
@@ -1098,14 +1097,14 @@ READLINE(3) Library Functions Manual READLINE(3)
chet.ramey@case.edu
BUG REPORTS
- If you find a bug in readline, you should report it. But first, you
- should make sure that it really is a bug, and that it appears in the
+ If you find a bug in readline, you should report it. But first, you
+ should make sure that it really is a bug, and that it appears in the
latest version of the readline library that you have.
- Once you have determined that a bug actually exists, mail a bug report
- to bug-readline@gnu.org. If you have a fix, you are welcome to mail
- that as well! Suggestions and `philosophical' bug reports may be
- mailed to bug-readline@gnu.org or posted to the Usenet newsgroup
+ Once you have determined that a bug actually exists, mail a bug report
+ to bug-readline@gnu.org. If you have a fix, you are welcome to mail
+ that as well! Suggestions and `philosophical' bug reports may be
+ mailed to bug-readline@gnu.org or posted to the Usenet newsgroup
gnu.bash.bug.
Comments and bug reports concerning this manual page should be directed