summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2022-01-20 16:03:56 -0500
committerChet Ramey <chet.ramey@case.edu>2022-01-20 16:03:56 -0500
commit21294bbcf2dde0eca5ab978fe4707eaa03000525 (patch)
tree377779bfe3f4566945545c4af74ea4d4080da15c /doc
parent5263c0d88064fda96292335d12eec1733f91cdc9 (diff)
readline-8.2-alpha releasereadline-8.2-alpha
Diffstat (limited to 'doc')
-rw-r--r--doc/hsuser.texi10
-rw-r--r--doc/readline.345
-rw-r--r--doc/rltech.texi53
-rw-r--r--doc/rluser.texi34
-rw-r--r--[-rwxr-xr-x]doc/texi2dvi0
-rw-r--r--[-rwxr-xr-x]doc/texi2html0
-rw-r--r--doc/version.texi8
7 files changed, 123 insertions, 27 deletions
diff --git a/doc/hsuser.texi b/doc/hsuser.texi
index b8fedf3..0a81c46 100644
--- a/doc/hsuser.texi
+++ b/doc/hsuser.texi
@@ -214,8 +214,9 @@ end of the history, and an index of @samp{-1} refers to the current
@code{history -d} command.
@item -d @var{start}-@var{end}
-Delete the history entries between positions @var{start} and @var{end},
-inclusive. Positive and negative values for @var{start} and @var{end}
+Delete the range of history entries between positions @var{start} and
+@var{end}, inclusive.
+Positive and negative values for @var{start} and @var{end}
are interpreted as described above.
@item -a
@@ -250,6 +251,11 @@ used, if @var{filename}
is given, then it is used as the history file. If not, then
the value of the @env{HISTFILE} variable is used.
+The return value is 0 unless an invalid option is encountered, an
+error occurs while reading or writing the history file, an invalid
+@var{offset} or range is supplied as an argument to @option{-d}, or the
+history expansion supplied as an argument to @option{-p} fails.
+
@end table
@end ifset
diff --git a/doc/readline.3 b/doc/readline.3
index 179c781..92ee63d 100644
--- a/doc/readline.3
+++ b/doc/readline.3
@@ -6,9 +6,9 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Tue Mar 24 09:27:30 EDT 2020
+.\" Last Change: Mon Nov 15 17:06:54 EST 2021
.\"
-.TH READLINE 3 "2020 October 29" "GNU Readline 8.1"
+.TH READLINE 3 "2021 November 15" "GNU Readline 8.1"
.\"
.\" File Name macro. This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
@@ -359,6 +359,9 @@ If set to \fBOn\fP, when listing completions, readline displays the
common prefix of the set of possible completions using a different color.
The color definitions are taken from the value of the \fBLS_COLORS\fP
environment variable.
+If there is a color definition in \fB$LS_COLORS\fP for the custom suffix
+"readline-colored-completion-prefix", readline uses this color for
+the common prefix instead of its default.
.TP
.B colored\-stats (Off)
If set to \fBOn\fP, readline displays possible completions using different
@@ -408,7 +411,8 @@ If the number of possible completions is greater than
or equal to the value of this variable,
readline will ask whether or not the user wishes to view them;
otherwise they are simply listed
-on the terminal. A negative value causes readline to never ask.
+on the terminal.
+A negative value causes readline to never ask.
.TP
.B convert\-meta (On)
If set to \fBOn\fP, readline will convert characters with the
@@ -447,6 +451,17 @@ Use the \e1 and \e2 escapes to begin and end sequences of
non-printing characters, which can be used to embed a terminal control
sequence into the mode string.
.TP
+.B enable\-active\-region (On)
+The \fIpoint\fP is the current cursor position, and \fImark\fP refers
+to a saved cursor position.
+The text between the point and mark is referred to as the \fIregion\fP.
+When this variable is set to \fIOn\fP, readline allows certain commands
+to designate the region as \fIactive\fP.
+When the region is active, readline highlights the text in the region using
+the terminal's standout mode.
+The active region shows the text inserted by bracketed-paste and any
+matching text found by incremental and non-incremental history searches.
+.TP
.B enable\-bracketed\-paste (On)
When set to \fBOn\fP, readline will configure the terminal in a way
that will enable it to insert each paste into the editing buffer as a
@@ -853,6 +868,21 @@ Move to the first line in the history.
Move to the end of the input history, i.e., the line currently being
entered.
.TP
+.B
+operate\-and\-get\-next (C\-o)
+Accept the current line for return to the calling application as if a
+newline had been entered,
+and fetch the next line relative to the current line from the history
+for editing.
+A numeric argument, if supplied, specifies the history entry to use instead
+of the current line.
+.TP
+.B
+fetch\-history
+With a numeric argument, fetch that entry from the history list
+and make it the current line.
+Without an argument, move back to the first entry in the history list.
+.TP
.B reverse\-search\-history (C\-r)
Search backward starting at the current line and moving `up' through
the history as necessary. This is an incremental search.
@@ -919,15 +949,6 @@ the direction to move through the history. A negative argument switches
the direction through the history (back or forward).
The history expansion facilities are used to extract the last argument,
as if the "!$" history expansion had been specified.
-.TP
-.B
-operate\-and\-get\-next (C\-o)
-Accept the current line for return to the calling application as if a
-newline had been entered,
-and fetch the next line relative to the current line from the history
-for editing.
-A numeric argument, if supplied, specifies the history entry to use instead
-of the current line.
.PD
.SS Commands for Changing Text
.PD 0
diff --git a/doc/rltech.texi b/doc/rltech.texi
index bbf57c2..8c4814e 100644
--- a/doc/rltech.texi
+++ b/doc/rltech.texi
@@ -455,6 +455,11 @@ If non-zero, this is the address of a function to call if a read system
call is interrupted when Readline is reading terminal input.
@end deftypevar
+@deftypevar {rl_hook_func_t *} rl_timeout_event_hook
+If non-zero, this is the address of a function to call if Readline times
+out while reading input.
+@end deftypevar
+
@deftypevar {rl_hook_func_t *} rl_input_available_hook
If non-zero, Readline will use this function's return value when it needs
to determine whether or not there is available input on the current input
@@ -588,6 +593,10 @@ the current call to @code{readline()}.
@item RL_STATE_DONE
Readline has read a key sequence bound to @code{accept-line}
and is about to return the line to the caller.
+@item RL_STATE_TIMEOUT
+Readline has timed out (it did not receive a line or specified number of
+characters before the timeout duration specified by @code{rl_set_timeout}
+elapsed) and is returning that status to the caller.
@end table
@end deftypevar
@@ -876,6 +885,15 @@ It takes a "translated" key sequence and should be used if the key sequence
can include NUL.
@end deftypefun
+@deftypefun {int} rl_trim_arg_from_keyseq (const char *keyseq, size_t len, Keymap map)
+If there is a numeric argument at the beginning of @var{keyseq}, possibly
+including digits, return the index of the first character in @var{keyseq}
+following the numeric argument.
+This can be used to skip over the numeric argument (which is available as
+@code{rl_numeric_arg} while traversing the key sequence that invoked the
+current command.
+@end deftypefun
+
@deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function)
Return an array of strings representing the key sequences used to
invoke @var{function} in the current keymap.
@@ -1063,8 +1081,9 @@ It returns the number of visible characters on the last line of the
Applications may indicate that the prompt contains characters that take
up no physical screen space when displayed by bracketing a sequence of
such characters with the special markers @code{RL_PROMPT_START_IGNORE}
-and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h}). This may
-be used to embed terminal-specific escape sequences in prompts.
+and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h} as
+@samp{\001} and @samp{\002}, respectively).
+This may be used to embed terminal-specific escape sequences in prompts.
@end deftypefun
@deftypefun int rl_set_prompt (const char *prompt)
@@ -1151,6 +1170,27 @@ The default waiting period is one-tenth of a second.
Returns the old timeout value.
@end deftypefun
+@deftypefun int rl_set_timeout (unsigned int secs, unsigned int usecs)
+Set a timeout for subsequent calls to @code{readline()}. If Readline does
+not read a complete line, or the number of characters specified by
+@code{rl_num_chars_to_read}, before the duration specfied by @var{secs}
+(in seconds) and @var{usecs} (microseconds), it returns and sets
+@code{RL_STATE_TIMEOUT} in @code{rl_readline_state}.
+Passing 0 for @code{secs} and @code{usecs} cancels any previously set
+timeout; the convenience macro @code{rl_clear_timeout()} is shorthand
+for this.
+Returns 0 if the timeout is set successfully.
+@end deftypefun
+
+@deftypefun int rl_timeout_remaining (unsigned int *secs, unsigned int *usecs)
+Return the number of seconds and microseconds remaining in the current
+timeout duration in @code{*secs} and @code{*usecs}, respectively.
+Returns -1 on error or when there is no timeout set, 0 when the timeout has
+expired (leaving @code{*secs} and @code{*usecs} unchanged), and 1 if the
+timeout has not expired. If @code{secs} and @code{usecs} are @code{NULL},
+the return value indicates whether the timeout has expired.
+@end deftypefun
+
@node Terminal Management
@subsection Terminal Management
@@ -1611,7 +1651,7 @@ main (int c, char **v)
Signals are asynchronous events sent to a process by the Unix kernel,
sometimes on behalf of another process. They are intended to indicate
-exceptional events, like a user pressing the interrupt key on his terminal,
+exceptional events, like a user pressing the terminal's interrupt key,
or a network connection being broken. There is a class of signals that can
be sent to the process currently reading input from the keyboard. Since
Readline changes the terminal attributes when it is called, it needs to
@@ -2159,9 +2199,10 @@ shell variables and hostnames.
@deftypevar int rl_completion_query_items
Up to this many items will be displayed in response to a
-possible-completions call. After that, readline asks the user if she is sure
-she wants to see them all. The default value is 100. A negative value
-indicates that Readline should never ask the user.
+possible-completions call. After that, readline asks the user for
+confirmation before displaying them.
+The default value is 100. A negative value
+indicates that Readline should never ask for confirmation.
@end deftypevar
@deftypevar {int} rl_completion_append_character
diff --git a/doc/rluser.texi b/doc/rluser.texi
index 26b0ff0..505225b 100644
--- a/doc/rluser.texi
+++ b/doc/rluser.texi
@@ -339,7 +339,8 @@ Although the Readline library comes with a set of Emacs-like
keybindings installed by default, it is possible to use a different set
of keybindings.
Any user can customize programs that use Readline by putting
-commands in an @dfn{inputrc} file, conventionally in his home directory.
+commands in an @dfn{inputrc} file,
+conventionally in their home directory.
The name of this
@ifset BashFeatures
file is taken from the value of the shell variable @env{INPUTRC}. If
@@ -444,6 +445,9 @@ If set to @samp{on}, when listing completions, Readline displays the
common prefix of the set of possible completions using a different color.
The color definitions are taken from the value of the @env{LS_COLORS}
environment variable.
+If there is a color definition in @env{LS_COLORS} for the custom suffix
+@samp{readline-colored-completion-prefix}, Readline uses this color for
+the common prefix instead of its default.
The default is @samp{off}.
@item colored-stats
@@ -496,8 +500,9 @@ asked whether the list of possibilities should be displayed.
If the number of possible completions is greater than or equal to this value,
Readline will ask whether or not the user 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.
+This variable must be set to an integer value greater than or equal to zero.
+A zero value means Readline should never ask; negative values are
+treated as zero.
The default limit is @code{100}.
@item convert-meta
@@ -540,6 +545,19 @@ non-printing characters, which can be used to embed a terminal control
sequence into the mode string.
The default is @samp{@@}.
+@item enable-active-region
+@vindex enable-active-region
+The @dfn{point} is the current cursor position, and @dfn{mark} refers
+to a saved cursor position (@pxref{Commands For Moving}).
+The text between the point and mark is referred to as the @dfn{region}.
+When this variable is set to @samp{On}, Readline allows certain commands
+to designate the region as @dfn{active}.
+When the region is active, Readline highlights the text in the region using
+the terminal's standout mode.
+The active region shows the text inserted by bracketed-paste and any
+matching text found by incremental and non-incremental history searches.
+The default is @samp{On}.
+
@item enable-bracketed-paste
@vindex enable-bracketed-paste
When set to @samp{On}, Readline will configure the terminal in a way
@@ -1332,6 +1350,11 @@ for editing.
A numeric argument, if supplied, specifies the history entry to use instead
of the current line.
+@item fetch-history ()
+With a numeric argument, fetch that entry from the history list
+and make it the current line.
+Without an argument, move back to the first entry in the history list.
+
@end ftable
@node Commands For Text
@@ -1772,6 +1795,11 @@ the output is formatted in such a way that it can be made part
of an @var{inputrc} file. This command is unbound by default.
@ifset BashFeatures
+@item spell-correct-word (C-x s)
+Perform spelling correction on the current word, treating it as a directory
+or filename, in the same way as the @code{cdspell} shell option.
+Word boundaries are the same as those used by @code{shell-forward-word}.
+
@item glob-complete-word (M-g)
The word before point is treated as a pattern for pathname expansion,
with an asterisk implicitly appended. This pattern is used to
diff --git a/doc/texi2dvi b/doc/texi2dvi
index 17f4355..17f4355 100755..100644
--- a/doc/texi2dvi
+++ b/doc/texi2dvi
diff --git a/doc/texi2html b/doc/texi2html
index 13b5588..13b5588 100755..100644
--- a/doc/texi2html
+++ b/doc/texi2html
diff --git a/doc/version.texi b/doc/version.texi
index abb9cb6..0d5883f 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,10 +1,10 @@
@ignore
-Copyright (C) 1988-2020 Free Software Foundation, Inc.
+Copyright (C) 1988-2021 Free Software Foundation, Inc.
@end ignore
@set EDITION 8.1
@set VERSION 8.1
-@set UPDATED 29 October 2020
-@set UPDATED-MONTH October 2020
+@set UPDATED 15 November 2021
+@set UPDATED-MONTH November 2021
-@set LASTCHANGE Thu Oct 29 16:49:01 EDT 2020
+@set LASTCHANGE Mon Nov 15 17:05:28 EST 2021