mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-11 06:00:49 +02:00
wait -n' notifies on a job it returns; in posix mode, wait' defers notification on a reaped pid unless the shell is interactive, as posix now specifies
This commit is contained in:
+225
-192
@@ -772,15 +772,16 @@ PPAARRAAMMEETTEERRSS
|
||||
only be referenced; assignment to them is not allowed.
|
||||
** Expands to the positional parameters, starting from one. When
|
||||
the expansion is not within double quotes, each positional para-
|
||||
meter expands to a separate word. In contexts where it is per-
|
||||
formed, those words are subject to further word splitting and
|
||||
pathname expansion. When the expansion occurs within double
|
||||
quotes, it expands to a single word with the value of each para-
|
||||
meter separated by the first character of the IIFFSS special vari-
|
||||
able. That is, ""$$**"" is equivalent to ""$$11_c$$22_c......"", where _c is
|
||||
the first character of the value of the IIFFSS variable. If IIFFSS is
|
||||
unset, the parameters are separated by spaces. If IIFFSS is null,
|
||||
the parameters are joined without intervening separators.
|
||||
meter expands to a separate word. In contexts where these ex-
|
||||
pansions are performed, those words are subject to further word
|
||||
splitting and pathname expansion. When the expansion occurs
|
||||
within double quotes, it expands to a single word with the value
|
||||
of each parameter separated by the first character of the IIFFSS
|
||||
special variable. That is, ""$$**"" is equivalent to ""$$11_c$$22_c......"",
|
||||
where _c is the first character of the value of the IIFFSS variable.
|
||||
If IIFFSS is unset, the parameters are separated by spaces. If IIFFSS
|
||||
is null, the parameters are joined without intervening separa-
|
||||
tors.
|
||||
@@ Expands to the positional parameters, starting from one. In
|
||||
contexts where word splitting is performed, this expands each
|
||||
positional parameter to a separate word; if not within double
|
||||
@@ -796,8 +797,8 @@ PPAARRAAMMEETTEERRSS
|
||||
word. When there are no positional parameters, ""$$@@"" and $$@@ ex-
|
||||
pand to nothing (i.e., they are removed).
|
||||
## Expands to the number of positional parameters in decimal.
|
||||
?? Expands to the exit status of the most recently executed fore-
|
||||
ground command.
|
||||
?? Expands to the exit status of the most recently executed com-
|
||||
mand.
|
||||
-- Expands to the current option flags as specified upon invoca-
|
||||
tion, by the sseett builtin command, or those set by the shell it-
|
||||
self (such as the --ii option).
|
||||
@@ -3191,40 +3192,41 @@ JJOOBB CCOONNTTRROOLL
|
||||
|
||||
The shell learns immediately whenever a job changes state. Normally,
|
||||
bbaasshh waits until it is about to print a prompt before reporting changes
|
||||
in a job's status so as to not interrupt any other output. If the --bb
|
||||
option to the sseett builtin command is enabled, bbaasshh reports such changes
|
||||
immediately. Any trap on SSIIGGCCHHLLDD is executed for each child that ex-
|
||||
its.
|
||||
in a job's status so as to not interrupt any other output, though it
|
||||
will notify of changes in a job's status after a command in a list com-
|
||||
pletes, before executing the next command. If the --bb option to the sseett
|
||||
builtin command is enabled, bbaasshh reports such changes immediately. Any
|
||||
trap on SSIIGGCCHHLLDD is executed for each child that exits.
|
||||
|
||||
If an attempt to exit bbaasshh is made while jobs are stopped (or, if the
|
||||
cchheecckkjjoobbss shell option has been enabled using the sshhoopptt builtin, run-
|
||||
If an attempt to exit bbaasshh is made while jobs are stopped (or, if the
|
||||
cchheecckkjjoobbss shell option has been enabled using the sshhoopptt builtin, run-
|
||||
ning), the shell prints a warning message, and, if the cchheecckkjjoobbss option
|
||||
is enabled, lists the jobs and their statuses. The jjoobbss command may
|
||||
then be used to inspect their status. If a second attempt to exit is
|
||||
made without an intervening command, the shell does not print another
|
||||
is enabled, lists the jobs and their statuses. The jjoobbss command may
|
||||
then be used to inspect their status. If a second attempt to exit is
|
||||
made without an intervening command, the shell does not print another
|
||||
warning, and any stopped jobs are terminated.
|
||||
|
||||
When the shell is waiting for a job or process using the wwaaiitt builtin,
|
||||
and job control is enabled, wwaaiitt will return when the job changes
|
||||
state. The --ff option causes wwaaiitt to wait until the job or process ter-
|
||||
When the shell is waiting for a job or process using the wwaaiitt builtin,
|
||||
and job control is enabled, wwaaiitt will return when the job changes
|
||||
state. The --ff option causes wwaaiitt to wait until the job or process ter-
|
||||
minates before returning.
|
||||
|
||||
PPRROOMMPPTTIINNGG
|
||||
When executing interactively, bbaasshh displays the primary prompt PPSS11 when
|
||||
it is ready to read a command, and the secondary prompt PPSS22 when it
|
||||
needs more input to complete a command. BBaasshh displays PPSS00 after it
|
||||
reads a command but before executing it. BBaasshh displays PPSS44 as de-
|
||||
scribed above before tracing each command when the --xx option is en-
|
||||
abled. BBaasshh allows these prompt strings to be customized by inserting
|
||||
a number of backslash-escaped special characters that are decoded as
|
||||
it is ready to read a command, and the secondary prompt PPSS22 when it
|
||||
needs more input to complete a command. BBaasshh displays PPSS00 after it
|
||||
reads a command but before executing it. BBaasshh displays PPSS44 as de-
|
||||
scribed above before tracing each command when the --xx option is en-
|
||||
abled. BBaasshh allows these prompt strings to be customized by inserting
|
||||
a number of backslash-escaped special characters that are decoded as
|
||||
follows:
|
||||
\\aa an ASCII bell character (07)
|
||||
\\dd the date in "Weekday Month Date" format (e.g., "Tue May
|
||||
\\dd the date in "Weekday Month Date" format (e.g., "Tue May
|
||||
26")
|
||||
\\DD{{_f_o_r_m_a_t}}
|
||||
the _f_o_r_m_a_t is passed to _s_t_r_f_t_i_m_e(3) and the result is in-
|
||||
serted into the prompt string; an empty _f_o_r_m_a_t results in
|
||||
a locale-specific time representation. The braces are
|
||||
a locale-specific time representation. The braces are
|
||||
required
|
||||
\\ee an ASCII escape character (033)
|
||||
\\hh the hostname up to the first "."
|
||||
@@ -3233,7 +3235,7 @@ PPRROOMMPPTTIINNGG
|
||||
\\ll the basename of the shell's terminal device name
|
||||
\\nn newline
|
||||
\\rr carriage return
|
||||
\\ss the name of the shell, the basename of $$00 (the portion
|
||||
\\ss the name of the shell, the basename of $$00 (the portion
|
||||
following the final slash)
|
||||
\\tt the current time in 24-hour HH:MM:SS format
|
||||
\\TT the current time in 12-hour HH:MM:SS format
|
||||
@@ -3242,8 +3244,8 @@ PPRROOMMPPTTIINNGG
|
||||
\\uu the username of the current user
|
||||
\\vv the version of bbaasshh (e.g., 2.00)
|
||||
\\VV the release of bbaasshh, version + patch level (e.g., 2.00.0)
|
||||
\\ww the value of the PPWWDD shell variable ($$PPWWDD), with $$HHOOMMEE
|
||||
abbreviated with a tilde (uses the value of the
|
||||
\\ww the value of the PPWWDD shell variable ($$PPWWDD), with $$HHOOMMEE
|
||||
abbreviated with a tilde (uses the value of the
|
||||
PPRROOMMPPTT__DDIIRRTTRRIIMM variable)
|
||||
\\WW the basename of $$PPWWDD, with $$HHOOMMEE abbreviated with a tilde
|
||||
\\!! the history number of this command
|
||||
@@ -3251,70 +3253,82 @@ PPRROOMMPPTTIINNGG
|
||||
\\$$ if the effective UID is 0, a ##, otherwise a $$
|
||||
\\_n_n_n the character corresponding to the octal number _n_n_n
|
||||
\\\\ a backslash
|
||||
\\[[ begin a sequence of non-printing characters, which could
|
||||
be used to embed a terminal control sequence into the
|
||||
\\[[ begin a sequence of non-printing characters, which could
|
||||
be used to embed a terminal control sequence into the
|
||||
prompt
|
||||
\\]] end a sequence of non-printing characters
|
||||
|
||||
The command number and the history number are usually different: the
|
||||
history number of a command is its position in the history list, which
|
||||
may include commands restored from the history file (see HHIISSTTOORRYY be-
|
||||
low), while the command number is the position in the sequence of com-
|
||||
mands executed during the current shell session. After the string is
|
||||
decoded, it is expanded via parameter expansion, command substitution,
|
||||
arithmetic expansion, and quote removal, subject to the value of the
|
||||
The command number and the history number are usually different: the
|
||||
history number of a command is its position in the history list, which
|
||||
may include commands restored from the history file (see HHIISSTTOORRYY be-
|
||||
low), while the command number is the position in the sequence of com-
|
||||
mands executed during the current shell session. After the string is
|
||||
decoded, it is expanded via parameter expansion, command substitution,
|
||||
arithmetic expansion, and quote removal, subject to the value of the
|
||||
pprroommppttvvaarrss shell option (see the description of the sshhoopptt command under
|
||||
SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). This can have unwanted side effects if
|
||||
escaped portions of the string appear within command substitution or
|
||||
SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). This can have unwanted side effects if
|
||||
escaped portions of the string appear within command substitution or
|
||||
contain characters special to word expansion.
|
||||
|
||||
RREEAADDLLIINNEE
|
||||
This is the library that handles reading input when using an interac-
|
||||
This is the library that handles reading input when using an interac-
|
||||
tive shell, unless the ----nnooeeddiittiinngg option is given at shell invocation.
|
||||
Line editing is also used when using the --ee option to the rreeaadd builtin.
|
||||
By default, the line editing commands are similar to those of Emacs. A
|
||||
vi-style line editing interface is also available. Line editing can be
|
||||
enabled at any time using the --oo eemmaaccss or --oo vvii options to the sseett
|
||||
builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). To turn off line editing
|
||||
after the shell is running, use the ++oo eemmaaccss or ++oo vvii options to the
|
||||
enabled at any time using the --oo eemmaaccss or --oo vvii options to the sseett
|
||||
builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). To turn off line editing
|
||||
after the shell is running, use the ++oo eemmaaccss or ++oo vvii options to the
|
||||
sseett builtin.
|
||||
|
||||
RReeaaddlliinnee NNoottaattiioonn
|
||||
In this section, the Emacs-style notation is used to denote keystrokes.
|
||||
Control keys are denoted by C-_k_e_y, e.g., C-n means Control-N. Simi-
|
||||
larly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x means Meta-X. (On key-
|
||||
boards without a _m_e_t_a key, M-_x means ESC _x, i.e., press the Escape key
|
||||
then the _x key. This makes ESC the _m_e_t_a _p_r_e_f_i_x. The combination M-C-_x
|
||||
means ESC-Control-_x, or press the Escape key then hold the Control key
|
||||
while pressing the _x key.)
|
||||
Control keys are denoted by C-_k_e_y, e.g., C-n means Control-N. Simi-
|
||||
larly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x means Meta-X.
|
||||
|
||||
On keyboards without a _M_e_t_a key, M-_x means ESC _x, i.e., press the Es-
|
||||
cape key then the _x key. This makes ESC the _m_e_t_a _p_r_e_f_i_x. The combina-
|
||||
tion M-C-_x means ESC-Control-_x, or press the Escape key then hold the
|
||||
Control key while pressing the _x key.)
|
||||
|
||||
On some keyboards, the Meta key modifier produces meta characters with
|
||||
the eighth bit (0200) set (you can use the eennaabbllee--mmeettaa--kkeeyy variable to
|
||||
control whether or not it does this, if the keyboard allows it). On
|
||||
many others, the terminal or terminal emulator converts the metafied
|
||||
key to a key sequence beginning with ESC as described in the preceding
|
||||
paragraph.
|
||||
|
||||
If the _M_e_t_a key produces a key sequence with the ESC meta prefix, you
|
||||
can make M-_k_e_y key bindings you specify (see RReeaaddlliinnee KKeeyy BBiinnddiinnggss be-
|
||||
low) do the same thing by setting the ffoorrccee--mmeettaa--pprreeffiixx variable.
|
||||
|
||||
Readline commands may be given numeric _a_r_g_u_m_e_n_t_s, which normally act as
|
||||
a repeat count. Sometimes, however, it is the sign of the argument
|
||||
that is significant. Passing a negative argument to a command that
|
||||
acts in the forward direction (e.g., kkiillll--lliinnee) causes that command to
|
||||
act in a backward direction. Commands whose behavior with arguments
|
||||
a repeat count. Sometimes, however, it is the sign of the argument
|
||||
that is significant. Passing a negative argument to a command that
|
||||
acts in the forward direction (e.g., kkiillll--lliinnee) causes that command to
|
||||
act in a backward direction. Commands whose behavior with arguments
|
||||
deviates from this are noted below.
|
||||
|
||||
When a command is described as _k_i_l_l_i_n_g text, the text deleted is saved
|
||||
When a command is described as _k_i_l_l_i_n_g text, the text deleted is saved
|
||||
for possible future retrieval (_y_a_n_k_i_n_g). The killed text is saved in a
|
||||
_k_i_l_l _r_i_n_g. Consecutive kills cause the text to be accumulated into one
|
||||
unit, which can be yanked all at once. Commands which do not kill text
|
||||
separate the chunks of text on the kill ring.
|
||||
|
||||
RReeaaddlliinnee IInniittiiaalliizzaattiioonn
|
||||
Readline is customized by putting commands in an initialization file
|
||||
(the _i_n_p_u_t_r_c file). The name of this file is taken from the value of
|
||||
Readline is customized by putting commands in an initialization file
|
||||
(the _i_n_p_u_t_r_c file). The name of this file is taken from the value of
|
||||
the IINNPPUUTTRRCC variable. If that variable is unset, the default is _~_/_._i_n_-
|
||||
_p_u_t_r_c. If that file does not exist or cannot be read, the ultimate
|
||||
default is _/_e_t_c_/_i_n_p_u_t_r_c. When a program which uses the readline li-
|
||||
brary starts up, the initialization file is read, and the key bindings
|
||||
and variables are set. There are only a few basic constructs allowed
|
||||
in the readline initialization file. Blank lines are ignored. Lines
|
||||
beginning with a ## are comments. Lines beginning with a $$ indicate
|
||||
conditional constructs. Other lines denote key bindings and variable
|
||||
_p_u_t_r_c. If that file does not exist or cannot be read, the ultimate
|
||||
default is _/_e_t_c_/_i_n_p_u_t_r_c. When a program which uses the readline li-
|
||||
brary starts up, the initialization file is read, and the key bindings
|
||||
and variables are set. There are only a few basic constructs allowed
|
||||
in the readline initialization file. Blank lines are ignored. Lines
|
||||
beginning with a ## are comments. Lines beginning with a $$ indicate
|
||||
conditional constructs. Other lines denote key bindings and variable
|
||||
settings.
|
||||
|
||||
The default key-bindings may be changed with an _i_n_p_u_t_r_c file. Other
|
||||
The default key-bindings may be changed with an _i_n_p_u_t_r_c file. Other
|
||||
programs that use this library may add their own commands and bindings.
|
||||
|
||||
For example, placing
|
||||
@@ -3323,18 +3337,18 @@ RREEAADDLLIINNEE
|
||||
or
|
||||
C-Meta-u: universal-argument
|
||||
|
||||
into the _i_n_p_u_t_r_c would make M-C-u execute the readline command _u_n_i_v_e_r_-
|
||||
into the _i_n_p_u_t_r_c would make M-C-u execute the readline command _u_n_i_v_e_r_-
|
||||
_s_a_l_-_a_r_g_u_m_e_n_t.
|
||||
|
||||
The following symbolic character names are recognized: _R_U_B_O_U_T, _D_E_L,
|
||||
The following symbolic character names are recognized: _R_U_B_O_U_T, _D_E_L,
|
||||
_E_S_C, _L_F_D, _N_E_W_L_I_N_E, _R_E_T, _R_E_T_U_R_N, _S_P_C, _S_P_A_C_E, and _T_A_B.
|
||||
|
||||
In addition to command names, readline allows keys to be bound to a
|
||||
In addition to command names, readline allows keys to be bound to a
|
||||
string that is inserted when the key is pressed (a _m_a_c_r_o).
|
||||
|
||||
RReeaaddlliinnee KKeeyy BBiinnddiinnggss
|
||||
The syntax for controlling key bindings in the _i_n_p_u_t_r_c file is simple.
|
||||
All that is required is the name of the command or the text of a macro
|
||||
The syntax for controlling key bindings in the _i_n_p_u_t_r_c file is simple.
|
||||
All that is required is the name of the command or the text of a macro
|
||||
and a key sequence to which it should be bound. The name may be speci-
|
||||
fied in one of two ways: as a symbolic key name, possibly with _M_e_t_a_- or
|
||||
_C_o_n_t_r_o_l_- prefixes, or as a key sequence.
|
||||
@@ -3346,15 +3360,15 @@ RREEAADDLLIINNEE
|
||||
Meta-Rubout: backward-kill-word
|
||||
Control-o: "> output"
|
||||
|
||||
In the above example, _C_-_u is bound to the function uunniivveerrssaall--aarrgguummeenntt,
|
||||
_M_-_D_E_L is bound to the function bbaacckkwwaarrdd--kkiillll--wwoorrdd, and _C_-_o is bound to
|
||||
run the macro expressed on the right hand side (that is, to insert the
|
||||
In the above example, _C_-_u is bound to the function uunniivveerrssaall--aarrgguummeenntt,
|
||||
_M_-_D_E_L is bound to the function bbaacckkwwaarrdd--kkiillll--wwoorrdd, 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).
|
||||
|
||||
In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyysseeqq differs
|
||||
from kkeeyynnaammee above in that strings denoting an entire key sequence may
|
||||
be specified by placing the sequence within double quotes. Some GNU
|
||||
Emacs style key escapes can be used, as in the following example, but
|
||||
In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyysseeqq differs
|
||||
from kkeeyynnaammee above in that strings denoting an entire key sequence may
|
||||
be specified by placing the sequence within double quotes. Some GNU
|
||||
Emacs style key escapes can be used, as in the following example, but
|
||||
the symbolic character names are not recognized.
|
||||
|
||||
"\C-u": universal-argument
|
||||
@@ -3362,18 +3376,20 @@ RREEAADDLLIINNEE
|
||||
"\e[11~": "Function Key 1"
|
||||
|
||||
In this example, _C_-_u is again bound to the function uunniivveerrssaall--aarrgguummeenntt.
|
||||
_C_-_x _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is
|
||||
_C_-_x _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is
|
||||
bound to insert the text "Function Key 1".
|
||||
|
||||
The full set of GNU Emacs style escape sequences is
|
||||
\\CC-- control prefix
|
||||
\\MM-- meta prefix
|
||||
\\MM-- adding the meta prefix or converting the following char-
|
||||
acter to a meta character, as described below under
|
||||
ffoorrccee--mmeettaa--pprreeffiixx
|
||||
\\ee an escape character
|
||||
\\\\ backslash
|
||||
\\"" literal "
|
||||
\\'' literal '
|
||||
|
||||
In addition to the GNU Emacs style escape sequences, a second set of
|
||||
In addition to the GNU Emacs style escape sequences, a second set of
|
||||
backslash escapes is available:
|
||||
\\aa alert (bell)
|
||||
\\bb backspace
|
||||
@@ -3383,20 +3399,20 @@ RREEAADDLLIINNEE
|
||||
\\rr carriage return
|
||||
\\tt horizontal tab
|
||||
\\vv vertical tab
|
||||
\\_n_n_n the eight-bit character whose value is the octal value
|
||||
\\_n_n_n the eight-bit character whose value is the octal value
|
||||
_n_n_n (one to three digits)
|
||||
\\xx_H_H the eight-bit character whose value is the hexadecimal
|
||||
\\xx_H_H the eight-bit character whose value is the hexadecimal
|
||||
value _H_H (one or two hex digits)
|
||||
|
||||
When entering the text of a macro, single or double quotes must be used
|
||||
to indicate a macro definition. Unquoted text is assumed to be a func-
|
||||
tion name. In the macro body, the backslash escapes described above
|
||||
are expanded. Backslash will quote any other character in the macro
|
||||
tion name. In the macro body, the backslash escapes described above
|
||||
are expanded. Backslash will quote any other character in the macro
|
||||
text, including " and '.
|
||||
|
||||
BBaasshh allows the current readline key bindings to be displayed or modi-
|
||||
fied with the bbiinndd builtin command. The editing mode may be switched
|
||||
during interactive use by using the --oo option to the sseett builtin com-
|
||||
BBaasshh allows the current readline key bindings to be displayed or modi-
|
||||
fied with the bbiinndd builtin command. The editing mode may be switched
|
||||
during interactive use by using the --oo option to the sseett builtin com-
|
||||
mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
|
||||
|
||||
RReeaaddlliinnee VVaarriiaabblleess
|
||||
@@ -3407,109 +3423,111 @@ RREEAADDLLIINNEE
|
||||
sseett _v_a_r_i_a_b_l_e_-_n_a_m_e _v_a_l_u_e
|
||||
or using the bbiinndd builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
|
||||
|
||||
Except where noted, readline variables can take the values OOnn or OOffff
|
||||
(without regard to case). Unrecognized variable names are ignored.
|
||||
Except where noted, readline variables can take the values OOnn or OOffff
|
||||
(without regard to case). Unrecognized variable names are ignored.
|
||||
When readline reads a variable value, empty or null values, "on" (case-
|
||||
insensitive), and "1" are equivalent to OOnn. All other values are
|
||||
insensitive), and "1" are equivalent to OOnn. All other values are
|
||||
equivalent to OOffff. The variables and their default values are:
|
||||
|
||||
aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr
|
||||
A string variable that controls the text color and background
|
||||
when displaying the text in the active region (see the descrip-
|
||||
tion of eennaabbllee--aaccttiivvee--rreeggiioonn below). This string must not take
|
||||
A string variable that controls the text color and background
|
||||
when displaying the text in the active region (see the descrip-
|
||||
tion of eennaabbllee--aaccttiivvee--rreeggiioonn below). This string must not take
|
||||
up any physical character positions on the display, so it should
|
||||
consist only of terminal escape sequences. It is output to the
|
||||
terminal before displaying the text in the active region. This
|
||||
variable is reset to the default value whenever the terminal
|
||||
type changes. The default value is the string that puts the
|
||||
terminal in standout mode, as obtained from the terminal's ter-
|
||||
consist only of terminal escape sequences. It is output to the
|
||||
terminal before displaying the text in the active region. This
|
||||
variable is reset to the default value whenever the terminal
|
||||
type changes. The default value is the string that puts the
|
||||
terminal in standout mode, as obtained from the terminal's ter-
|
||||
minfo description. A sample value might be "\e[01;33m".
|
||||
aaccttiivvee--rreeggiioonn--eenndd--ccoolloorr
|
||||
A string variable that "undoes" the effects of aaccttiivvee--rree--
|
||||
ggiioonn--ssttaarrtt--ccoolloorr and restores "normal" terminal display appear-
|
||||
ance after displaying text in the active region. This string
|
||||
must not take up any physical character positions on the dis-
|
||||
play, so it should consist only of terminal escape sequences.
|
||||
It is output to the terminal after displaying the text in the
|
||||
active region. This variable is reset to the default value
|
||||
whenever the terminal type changes. The default value is the
|
||||
string that restores the terminal from standout mode, as ob-
|
||||
A string variable that "undoes" the effects of aaccttiivvee--rree--
|
||||
ggiioonn--ssttaarrtt--ccoolloorr and restores "normal" terminal display appear-
|
||||
ance after displaying text in the active region. This string
|
||||
must not take up any physical character positions on the dis-
|
||||
play, so it should consist only of terminal escape sequences.
|
||||
It is output to the terminal after displaying the text in the
|
||||
active region. This variable is reset to the default value
|
||||
whenever the terminal type changes. The default value is the
|
||||
string that restores the terminal from standout mode, as ob-
|
||||
tained from the terminal's terminfo description. A sample value
|
||||
might be "\e[0m".
|
||||
bbeellll--ssttyyllee ((aauuddiibbllee))
|
||||
Controls what happens when readline wants to ring the terminal
|
||||
Controls what happens when readline wants to ring the terminal
|
||||
bell. If set to nnoonnee, readline never rings the bell. If set to
|
||||
vviissiibbllee, readline uses a visible bell if one is available. If
|
||||
vviissiibbllee, readline uses a visible bell if one is available. If
|
||||
set to aauuddiibbllee, readline attempts to ring the terminal's bell.
|
||||
bbiinndd--ttttyy--ssppeecciiaall--cchhaarrss ((OOnn))
|
||||
If set to OOnn (the default), readline attempts to bind the con-
|
||||
If set to OOnn (the default), readline attempts to bind the con-
|
||||
trol characters that are treated specially by the kernel's ter-
|
||||
minal driver to their readline equivalents. These override the
|
||||
default readline bindings described here. Type "stty -a" at a
|
||||
minal driver to their readline equivalents. These override the
|
||||
default readline bindings described here. Type "stty -a" at a
|
||||
bbaasshh prompt to see your current terminal settings, including the
|
||||
special control characters (usually cccchhaarrss).
|
||||
bblliinnkk--mmaattcchhiinngg--ppaarreenn ((OOffff))
|
||||
If set to OOnn, readline attempts to briefly move the cursor to an
|
||||
opening parenthesis when a closing parenthesis is inserted.
|
||||
ccoolloorreedd--ccoommpplleettiioonn--pprreeffiixx ((OOffff))
|
||||
If set to OOnn, when listing completions, readline displays the
|
||||
If set to OOnn, when listing completions, readline displays the
|
||||
common prefix of the set of possible completions using a differ-
|
||||
ent color. The color definitions are taken from the value of
|
||||
ent color. The color definitions are taken from the value of
|
||||
the LLSS__CCOOLLOORRSS environment variable. If there is a color defini-
|
||||
tion in $$LLSS__CCOOLLOORRSS for the custom suffix "readline-colored-com-
|
||||
pletion-prefix", readline uses this color for the common prefix
|
||||
tion in $$LLSS__CCOOLLOORRSS for the custom suffix "readline-colored-com-
|
||||
pletion-prefix", readline uses this color for the common prefix
|
||||
instead of its default.
|
||||
ccoolloorreedd--ssttaattss ((OOffff))
|
||||
If set to OOnn, readline displays possible completions using dif-
|
||||
ferent colors to indicate their file type. The color defini-
|
||||
tions are taken from the value of the LLSS__CCOOLLOORRSS environment
|
||||
If set to OOnn, readline displays possible completions using dif-
|
||||
ferent colors to indicate their file type. The color defini-
|
||||
tions are taken from the value of the LLSS__CCOOLLOORRSS environment
|
||||
variable.
|
||||
ccoommmmeenntt--bbeeggiinn (("##"))
|
||||
The string that is inserted when the readline iinnsseerrtt--ccoommmmeenntt
|
||||
The string that is inserted when the readline iinnsseerrtt--ccoommmmeenntt
|
||||
command is executed. This command is bound to MM--## in emacs mode
|
||||
and to ## in vi command mode.
|
||||
ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh ((--11))
|
||||
The number of screen columns used to display possible matches
|
||||
when performing completion. The value is ignored if it is less
|
||||
than 0 or greater than the terminal screen width. A value of 0
|
||||
will cause matches to be displayed one per line. The default
|
||||
The number of screen columns used to display possible matches
|
||||
when performing completion. The value is ignored if it is less
|
||||
than 0 or greater than the terminal screen width. A value of 0
|
||||
will cause matches to be displayed one per line. The default
|
||||
value is -1.
|
||||
ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff))
|
||||
If set to OOnn, readline performs filename matching and completion
|
||||
in a case-insensitive fashion.
|
||||
ccoommpplleettiioonn--mmaapp--ccaassee ((OOffff))
|
||||
If set to OOnn, and ccoommpplleettiioonn--iiggnnoorree--ccaassee is enabled, readline
|
||||
treats hyphens (_-) and underscores (__) as equivalent when per-
|
||||
If set to OOnn, and ccoommpplleettiioonn--iiggnnoorree--ccaassee is enabled, readline
|
||||
treats hyphens (_-) and underscores (__) as equivalent when per-
|
||||
forming case-insensitive filename matching and completion.
|
||||
ccoommpplleettiioonn--pprreeffiixx--ddiissppllaayy--lleennggtthh ((00))
|
||||
The length in characters of the common prefix of a list of pos-
|
||||
sible completions that is displayed without modification. When
|
||||
set to a value greater than zero, common prefixes longer than
|
||||
this value are replaced with an ellipsis when displaying possi-
|
||||
The length in characters of the common prefix of a list of pos-
|
||||
sible completions that is displayed without modification. When
|
||||
set to a value greater than zero, common prefixes longer than
|
||||
this value are replaced with an ellipsis when displaying possi-
|
||||
ble completions.
|
||||
ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000))
|
||||
This determines when the user is queried about viewing the num-
|
||||
ber of possible completions generated by the ppoossssiibbllee--ccoommppllee--
|
||||
ttiioonnss command. It may be set to any integer value greater than
|
||||
or equal to zero. 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 zero value means
|
||||
This determines when the user is queried about viewing the num-
|
||||
ber of possible completions generated by the ppoossssiibbllee--ccoommppllee--
|
||||
ttiioonnss command. It may be set to any integer value greater than
|
||||
or equal to zero. 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 zero value means
|
||||
readline should never ask; negative values are treated as zero.
|
||||
ccoonnvveerrtt--mmeettaa ((OOnn))
|
||||
If set to OOnn, readline will convert characters with the eighth
|
||||
bit set to an ASCII key sequence by stripping the eighth bit and
|
||||
prefixing an escape character (in effect, using escape as the
|
||||
_m_e_t_a _p_r_e_f_i_x). The default is _O_n, but readline will set it to
|
||||
_O_f_f if the locale contains eight-bit characters. This variable
|
||||
is dependent on the LLCC__CCTTYYPPEE locale category, and may change if
|
||||
the locale is changed.
|
||||
If set to OOnn, readline will convert characters it reads with the
|
||||
eighth bit set to an ASCII key sequence by stripping the eighth
|
||||
bit and prefixing it with an escape character (converting the
|
||||
character to have the _m_e_t_a _p_r_e_f_i_x). The default is _O_n, but
|
||||
readline will set it to _O_f_f if the locale contains characters
|
||||
whose encodings may include bytes with the eighth bit set. This
|
||||
variable is dependent on the LLCC__CCTTYYPPEE locale category, and may
|
||||
change if the locale is changed. This variable also affects key
|
||||
bindings; see the description of ffoorrccee--mmeettaa--pprreeffiixx below.
|
||||
ddiissaabbllee--ccoommpplleettiioonn ((OOffff))
|
||||
If set to OOnn, readline will inhibit word completion. Completion
|
||||
characters will be inserted into the line as if they had been
|
||||
characters will be inserted into the line as if they had been
|
||||
mapped to sseellff--iinnsseerrtt.
|
||||
eecchhoo--ccoonnttrrooll--cchhaarraacctteerrss ((OOnn))
|
||||
When set to OOnn, on operating systems that indicate they support
|
||||
When set to OOnn, on operating systems that indicate they support
|
||||
it, readline echoes a character corresponding to a signal gener-
|
||||
ated from the keyboard.
|
||||
eeddiittiinngg--mmooddee ((eemmaaccss))
|
||||
@@ -3517,29 +3535,29 @@ RREEAADDLLIINNEE
|
||||
ilar to _E_m_a_c_s or _v_i. eeddiittiinngg--mmooddee can be set to either eemmaaccss or
|
||||
vvii.
|
||||
eemmaaccss--mmooddee--ssttrriinngg ((@@))
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t 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
|
||||
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.
|
||||
eennaabbllee--aaccttiivvee--rreeggiioonn ((OOnn))
|
||||
The _p_o_i_n_t is the current cursor position, and _m_a_r_k refers to a
|
||||
saved cursor position. The text between the point and mark is
|
||||
referred to as the _r_e_g_i_o_n. When this variable is set to _O_n,
|
||||
readline allows certain commands to designate the region as _a_c_-
|
||||
_t_i_v_e. When the region is active, readline highlights the text
|
||||
in the region using the value of the aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr,
|
||||
which defaults to the string that enables the terminal's stand-
|
||||
out mode. The active region shows the text inserted by brack-
|
||||
eted-paste and any matching text found by incremental and non-
|
||||
The _p_o_i_n_t is the current cursor position, and _m_a_r_k refers to a
|
||||
saved cursor position. The text between the point and mark is
|
||||
referred to as the _r_e_g_i_o_n. When this variable is set to _O_n,
|
||||
readline allows certain commands to designate the region as _a_c_-
|
||||
_t_i_v_e. When the region is active, readline highlights the text
|
||||
in the region using the value of the aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr,
|
||||
which defaults to the string that enables the terminal's stand-
|
||||
out mode. The active region shows the text inserted by brack-
|
||||
eted-paste and any matching text found by incremental and non-
|
||||
incremental history searches.
|
||||
eennaabbllee--bbrraacckkeetteedd--ppaassttee ((OOnn))
|
||||
When set to OOnn, readline configures the terminal to insert each
|
||||
paste into the editing buffer as a single string of characters,
|
||||
instead of treating each character as if it had been read from
|
||||
When set to OOnn, readline configures the terminal to insert each
|
||||
paste into the editing buffer as a single string of characters,
|
||||
instead of treating each character as if it had been read from
|
||||
the keyboard. This prevents readline from executing any editing
|
||||
commands bound to key sequences appearing in the pasted text.
|
||||
eennaabbllee--kkeeyyppaadd ((OOffff))
|
||||
@@ -3547,39 +3565,54 @@ RREEAADDLLIINNEE
|
||||
pad when it is called. Some systems need this to enable the ar-
|
||||
row keys.
|
||||
eennaabbllee--mmeettaa--kkeeyy ((OOnn))
|
||||
When set to OOnn, 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.
|
||||
When set to OOnn, 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;
|
||||
this variable checks for the terminal capability that indicates
|
||||
the terminal can enable and disable a mode that sets the eighth
|
||||
bit of a character (0200) if the Meta key is held down when the
|
||||
character is typed (a meta character).
|
||||
ffoorrccee--mmeettaa--pprreeffiixx ((OOffff))
|
||||
If set to OOnn, readline modifies its behavior when binding key
|
||||
sequences containing \M- or Meta- (see KKeeyy BBiinnddiinnggss above) by
|
||||
converting a key sequence of the form \M-_C or Meta-_C to the two-
|
||||
character sequence EESSCC_C (adding the meta prefix). If
|
||||
ffoorrccee--mmeettaa--pprreeffiixx is set to OOffff (the default), readline uses the
|
||||
value of the ccoonnvveerrtt--mmeettaa variable to determine whether to per-
|
||||
form this conversion: if ccoonnvveerrtt--mmeettaa is OOnn, readline performs
|
||||
the conversion described above; if it is OOffff, Readline converts
|
||||
_C to a meta character by setting the eighth bit (0200).
|
||||
eexxppaanndd--ttiillddee ((OOffff))
|
||||
If set to OOnn, tilde expansion is performed when readline at-
|
||||
If set to OOnn, tilde expansion is performed when readline at-
|
||||
tempts word completion.
|
||||
hhiissttoorryy--pprreesseerrvvee--ppooiinntt ((OOffff))
|
||||
If set to OOnn, the history code attempts to place point at the
|
||||
same location on each history line retrieved with pprreevviioouuss--hhiiss--
|
||||
If set to OOnn, the history code attempts to place point at the
|
||||
same location on each history line retrieved with pprreevviioouuss--hhiiss--
|
||||
ttoorryy or nneexxtt--hhiissttoorryy.
|
||||
hhiissttoorryy--ssiizzee ((uunnsseett))
|
||||
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
|
||||
number of history entries is set to the value of the HHIISSTTSSIIZZEE
|
||||
shell variable. If an attempt is made to set _h_i_s_t_o_r_y_-_s_i_z_e to a
|
||||
the number of history entries is not limited. By default, the
|
||||
number of history entries is set to the value of the HHIISSTTSSIIZZEE
|
||||
shell variable. If an attempt is made to set _h_i_s_t_o_r_y_-_s_i_z_e to a
|
||||
non-numeric value, the maximum number of history entries will be
|
||||
set to 500.
|
||||
hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff))
|
||||
When set to OOnn, makes readline use a single line for display,
|
||||
When set to OOnn, 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
|
||||
new line. This setting is automatically enabled for terminals
|
||||
becomes longer than the screen width rather than wrapping to a
|
||||
new line. This setting is automatically enabled for terminals
|
||||
of height 1.
|
||||
iinnppuutt--mmeettaa ((OOffff))
|
||||
If set to OOnn, readline will enable eight-bit input (that is, it
|
||||
If set to OOnn, readline will enable eight-bit input (that is, it
|
||||
will not strip the eighth bit from the characters it reads), re-
|
||||
gardless of what the terminal claims it can support. The name
|
||||
mmeettaa--ffllaagg is a synonym for this variable. The default is _O_f_f,
|
||||
but readline will set it to _O_n if the locale contains eight-bit
|
||||
characters. This variable is dependent on the LLCC__CCTTYYPPEE locale
|
||||
category, and may change if the locale is changed.
|
||||
gardless of what the terminal claims it can support. The name
|
||||
mmeettaa--ffllaagg is a synonym for this variable. The default is _O_f_f,
|
||||
but readline will set it to _O_n if the locale contains characters
|
||||
whose encodings may include bytes with the eighth bit set. This
|
||||
variable is dependent on the LLCC__CCTTYYPPEE locale category, and may
|
||||
change if the locale is changed.
|
||||
iisseeaarrcchh--tteerrmmiinnaattoorrss (("CC--[[CC--JJ"))
|
||||
The string of characters that should terminate an incremental
|
||||
search without subsequently executing the character as a com-
|
||||
@@ -3625,9 +3658,9 @@ RREEAADDLLIINNEE
|
||||
If set to OOnn, readline will display characters with the eighth
|
||||
bit set directly rather than as a meta-prefixed escape sequence.
|
||||
The default is _O_f_f, but readline will set it to _O_n if the locale
|
||||
contains eight-bit characters. This variable is dependent on
|
||||
the LLCC__CCTTYYPPEE locale category, and may change if the locale is
|
||||
changed.
|
||||
contains characters whose encodings may include bytes with the
|
||||
eighth bit set. This variable is dependent on the LLCC__CCTTYYPPEE lo-
|
||||
cale category, and may change if the locale is changed.
|
||||
ppaaggee--ccoommpplleettiioonnss ((OOnn))
|
||||
If set to OOnn, readline uses an internal _m_o_r_e-like pager to dis-
|
||||
play a screenful of possible completions at a time.
|
||||
@@ -6945,4 +6978,4 @@ BBUUGGSS
|
||||
|
||||
There may be only one active coprocess at a time.
|
||||
|
||||
GNU Bash 5.3 2024 August 16 _B_A_S_H(1)
|
||||
GNU Bash 5.3 2024 September 5 _B_A_S_H(1)
|
||||
|
||||
Reference in New Issue
Block a user