mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 08:29:54 +02:00
commit bash-20180720 snapshot
This commit is contained in:
+110
@@ -3984,3 +3984,113 @@ doc/{bash.1,bashref.texi}
|
||||
- indirect expansion: clarify that the expansion works on parameters,
|
||||
not just variables (NAMEs). Suggested by konsolebox
|
||||
<konsolebox@gmail.com>
|
||||
|
||||
7/16
|
||||
----
|
||||
doc/{bash.1,bashref.texi}
|
||||
- INSIDE_EMACS: document its effect on line editing
|
||||
|
||||
7/17
|
||||
----
|
||||
lib/readline/{readline.c,rlprivate.h}
|
||||
- _rl_eof_found: new variable, private to the readline library, that
|
||||
indicates whether the current call to readline() will return NULL
|
||||
because we read EOF
|
||||
|
||||
lib/readline/rltty.c
|
||||
- rl_deprep_terminal: if bracketed paste mode is active, the last
|
||||
character of the string to disable it is \r (to avoid confusing
|
||||
the terminal driver about where the cursor is). In this case,
|
||||
output a newline before returning so subsequent text (like the
|
||||
`exit' bash prints) doesn't overwrite the prompt. Bug from
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903936
|
||||
|
||||
variables.c
|
||||
- make_local_assoc_variable: add second argument like corresponding
|
||||
local array function, to allow this function to return an existing
|
||||
local array variable to the caller for the caller to handle
|
||||
|
||||
variables.h
|
||||
- make_local_assoc_variable: change function prototype to add second
|
||||
arg
|
||||
|
||||
{subst.c,variables.c}
|
||||
- make_local_assoc_variable: change callers
|
||||
|
||||
builtins/declare.def
|
||||
- declare_internal: call make_local_assoc_variable with a non-zero
|
||||
second arg to have it return an existing local array variable to be
|
||||
flagged as an error. Fixes bug reported by Grisha Levit
|
||||
<grishalevit@gmail.com>
|
||||
- declare_internal: call make_local_array_variable with unconditional
|
||||
second argument of 1 for the same reason as above
|
||||
|
||||
7/18
|
||||
----
|
||||
variables.c
|
||||
- bind_invalid_envvar: new function, takes invalid names from the
|
||||
initial environment (names that are not valid shell identifiers) and
|
||||
stores them in a separate hash table (invalid_env)
|
||||
- maybe_make_export_env: make sure to add names from invalid_env to
|
||||
the export env
|
||||
- assign_in_env: for now, prevent variable names that aren't shell
|
||||
identifiers from being added to the temporary environment. Addresses
|
||||
issue raised by Grisha Levit <grishalevit@gmail.com>
|
||||
|
||||
test.c
|
||||
- unary_test: rearrange code slightly to avoid a wasted variable lookup
|
||||
if the argument to -v is a subscripted array reference
|
||||
|
||||
7/19
|
||||
----
|
||||
variables.c
|
||||
- nameref_transform_name: if a name doesn't resolve to a shell variable,
|
||||
this function will check whether it resolves to a nameref that
|
||||
points to a variable that hasn't been created yet
|
||||
|
||||
variables.h
|
||||
- nameref_transform_name: extern declaration
|
||||
|
||||
subst.c
|
||||
- do_compound_assignment: make sure that we follow any nameref chain
|
||||
if the name passed resolves to a nameref that points to a variable
|
||||
that doesn't exist. Fixes issue raised by Grisha Levit
|
||||
<grishalevit@gmail.com>
|
||||
|
||||
builtins/declare.def
|
||||
- declare_internal: before calling any variant of make_local_variable,
|
||||
make sure to perform any transformation of the name indicated by an
|
||||
existing nameref. Fixes issue raised by Grisha Levit
|
||||
<grishalevit@gmail.com>
|
||||
|
||||
7/20
|
||||
----
|
||||
builtins/declare.def
|
||||
- declare_internal: if we are creating a global variable with -g, even
|
||||
if we're not giving it a value, check for namerefs at the global
|
||||
scope to avoid confusion with namerefs at the local (function) scope.
|
||||
|
||||
subst.c
|
||||
- expand_word_internal: if a double-quoted string expands to nothing,
|
||||
make sure we note that for later by setting had_quoted_null, just
|
||||
as we do for single-quoted empty strings
|
||||
|
||||
subst.[ch]
|
||||
- W_SAWQUOTEDNULL: new flag (replaces W_HASCTLESC, which is unused),
|
||||
means that we saw a possibly-discarded quoted null while expanding
|
||||
this word
|
||||
|
||||
subst.c
|
||||
- expand_word_internal: if expansion results in a non-empty word but
|
||||
we saw a quoted null during expansion (had_quoted_null == 1), set
|
||||
W_SAWQUOTED_NULL in the returned word
|
||||
- expand_word_internal: if a recursive call to param_expand comes back
|
||||
with W_SAWQUOTEDNULL set in the resulting word, set had_quoted_null
|
||||
to note it
|
||||
- parameter_brace_expand_rhs: if a recursive call to expand_word_internal
|
||||
returns a non-quoted-null string (after an optional call to
|
||||
string_list) make sure we pass the W_SAWQUOTEDNULL flag back to the
|
||||
caller
|
||||
- word_list_split: if a word expands to nothing after expansion and
|
||||
splitting, but we saw a quoted null during the expansion
|
||||
(W_SAWQUOTEDNULL), return an empty word
|
||||
|
||||
@@ -882,6 +882,7 @@ tests/assoc6.sub f
|
||||
tests/assoc7.sub f
|
||||
tests/assoc8.sub f
|
||||
tests/assoc9.sub f
|
||||
tests/assoc10.sub f
|
||||
tests/attr.tests f
|
||||
tests/attr.right f
|
||||
tests/attr1.sub f
|
||||
@@ -1139,6 +1140,7 @@ tests/nameref16.sub f
|
||||
tests/nameref17.sub f
|
||||
tests/nameref18.sub f
|
||||
tests/nameref19.sub f
|
||||
tests/nameref20.sub f
|
||||
tests/nameref.right f
|
||||
tests/new-exp.tests f
|
||||
tests/new-exp1.sub f
|
||||
@@ -1203,6 +1205,7 @@ tests/procsub1.sub f
|
||||
tests/quote.tests f
|
||||
tests/quote.right f
|
||||
tests/quote1.sub f
|
||||
tests/quote2.sub f
|
||||
tests/read.tests f
|
||||
tests/read.right f
|
||||
tests/read1.sub f
|
||||
@@ -1369,6 +1372,7 @@ tests/varenv9.sub f
|
||||
tests/varenv10.sub f
|
||||
tests/varenv11.sub f
|
||||
tests/varenv12.sub f
|
||||
tests/varenv13.sub f
|
||||
tests/version f
|
||||
tests/version.mini f
|
||||
tests/vredir.tests f
|
||||
|
||||
+14
-7
@@ -440,19 +440,25 @@ restart_new_var_name:
|
||||
refvar = (SHELL_VAR *)NULL;
|
||||
if (variable_context && mkglobal == 0 && ((flags_on & att_function) == 0))
|
||||
{
|
||||
char *newname;
|
||||
|
||||
/* check name for validity here? */
|
||||
var = find_variable (name);
|
||||
newname = (var == 0) ? nameref_transform_name (name, ASS_MKLOCAL) : name;
|
||||
#if defined (ARRAY_VARS)
|
||||
/* Pass 1 as second argument to make_local_{assoc,array}_variable
|
||||
return an existing {array,assoc} variable to be flagged as an
|
||||
error below. */
|
||||
if (flags_on & att_assoc)
|
||||
var = make_local_assoc_variable (name);
|
||||
var = make_local_assoc_variable (newname, 1);
|
||||
else if ((flags_on & att_array) || making_array_special)
|
||||
var = make_local_array_variable (name, making_array_special);
|
||||
var = make_local_array_variable (newname, 1);
|
||||
else
|
||||
#endif
|
||||
if (offset == 0 && (flags_on & att_nameref))
|
||||
{
|
||||
/* First look for refvar at current scope */
|
||||
refvar = find_variable_last_nameref (name, 1);
|
||||
var = find_variable (name);
|
||||
/* VARIABLE_CONTEXT != 0, so we are attempting to create or modify
|
||||
the attributes for a local variable at the same scope. If we've
|
||||
used a reference from a previous context to resolve VAR, we
|
||||
@@ -471,7 +477,8 @@ restart_new_var_name:
|
||||
}
|
||||
else
|
||||
/* XXX - check name for validity here with valid_nameref_value */
|
||||
var = make_local_variable (name, 0); /* sets att_invisible for new vars */
|
||||
var = make_local_variable ((flags_on & att_nameref) ? name : newname, 0); /* sets att_invisible for new vars */
|
||||
|
||||
if (var == 0)
|
||||
{
|
||||
any_failed++;
|
||||
@@ -623,14 +630,14 @@ restart_new_var_name:
|
||||
}
|
||||
#endif
|
||||
|
||||
/* See if we are trying to set flags or value for an existing nameref
|
||||
that points to a non-existent variable: e.g.,
|
||||
/* See if we are trying to set flags or value (or create) for an
|
||||
existing nameref that points to a non-existent variable: e.g.,
|
||||
declare -n foo=bar
|
||||
unset foo # unsets bar
|
||||
declare -i foo
|
||||
foo=4+4
|
||||
declare -p foo */
|
||||
if (var == 0 && (flags_on || flags_off || offset))
|
||||
if (var == 0 && (mkglobal || flags_on || flags_off || offset))
|
||||
{
|
||||
refvar = mkglobal ? find_global_variable_last_nameref (name, 0) : find_variable_last_nameref (name, 0);
|
||||
if (refvar && nameref_p (refvar) == 0)
|
||||
|
||||
@@ -94,7 +94,7 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
|
||||
#define W_HASQUOTEDNULL 0x040000 /* word contains a quoted null character */
|
||||
#define W_DQUOTE 0x080000 /* word should be treated as if double-quoted */
|
||||
#define W_NOPROCSUB 0x100000 /* don't perform process substitution */
|
||||
#define W_HASCTLESC 0x200000 /* word contains literal CTLESC characters */
|
||||
#define W_SAWQUOTEDNULL 0x200000 /* word contained a quoted null that was removed */
|
||||
#define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */
|
||||
#define W_ASSIGNARRAY 0x800000 /* word looks like a compound indexed array assignment */
|
||||
#define W_ARRAYIND 0x1000000 /* word is an array index being expanded */
|
||||
|
||||
+40
-38
@@ -382,24 +382,24 @@ SSHHEELLLL GGRRAAMMMMAARR
|
||||
|
||||
An additional binary operator, ==~~, is available, with the same
|
||||
precedence as ==== and !!==. When it is used, the string to the
|
||||
right of the operator is considered an extended regular expres-
|
||||
sion and matched accordingly (as in _r_e_g_e_x(3)). The return value
|
||||
is 0 if the string matches the pattern, and 1 otherwise. If the
|
||||
regular expression is syntactically incorrect, the conditional
|
||||
expression's return value is 2. If the nnooccaasseemmaattcchh shell option
|
||||
is enabled, the match is performed without regard to the case of
|
||||
alphabetic characters. Any part of the pattern may be quoted to
|
||||
force the quoted portion to be matched as a string. Bracket
|
||||
expressions in regular expressions must be treated carefully,
|
||||
since normal quoting characters lose their meanings between
|
||||
brackets. If the pattern is stored in a shell variable, quoting
|
||||
the variable expansion forces the entire pattern to be matched
|
||||
as a string. Substrings matched by parenthesized subexpressions
|
||||
within the regular expression are saved in the array variable
|
||||
BBAASSHH__RREEMMAATTCCHH. The element of BBAASSHH__RREEMMAATTCCHH with index 0 is the
|
||||
portion of the string matching the entire regular expression.
|
||||
The element of BBAASSHH__RREEMMAATTCCHH with index _n is the portion of the
|
||||
string matching the _nth parenthesized subexpression.
|
||||
right of the operator is considered a POSIX extended regular
|
||||
expression and matched accordingly (as in _r_e_g_e_x(3)). The return
|
||||
value is 0 if the string matches the pattern, and 1 otherwise.
|
||||
If the regular expression is syntactically incorrect, the condi-
|
||||
tional expression's return value is 2. If the nnooccaasseemmaattcchh shell
|
||||
option is enabled, the match is performed without regard to the
|
||||
case of alphabetic characters. Any part of the pattern may be
|
||||
quoted to force the quoted portion to be matched as a string.
|
||||
Bracket expressions in regular expressions must be treated care-
|
||||
fully, since normal quoting characters lose their meanings
|
||||
between brackets. If the pattern is stored in a shell variable,
|
||||
quoting the variable expansion forces the entire pattern to be
|
||||
matched as a string. Substrings matched by parenthesized subex-
|
||||
pressions within the regular expression are saved in the array
|
||||
variable BBAASSHH__RREEMMAATTCCHH. The element of BBAASSHH__RREEMMAATTCCHH with index 0
|
||||
is the portion of the string matching the entire regular expres-
|
||||
sion. The element of BBAASSHH__RREEMMAATTCCHH with index _n is the portion
|
||||
of the string matching the _nth parenthesized subexpression.
|
||||
|
||||
Expressions may be combined using the following operators,
|
||||
listed in decreasing order of precedence:
|
||||
@@ -812,18 +812,20 @@ PPAARRAAMMEETTEERRSS
|
||||
is pushed onto BBAASSHH__AARRGGCC. The shell sets BBAASSHH__AARRGGCC only when in
|
||||
extended debugging mode (see the description of the eexxttddeebbuugg
|
||||
option to the sshhoopptt builtin below). Setting eexxttddeebbuugg after the
|
||||
shell has started to execute a script may result in inconsistent
|
||||
values.
|
||||
shell has started to execute a script, or referencing this vari-
|
||||
able when eexxttddeebbuugg is not set, may result in inconsistent val-
|
||||
ues.
|
||||
BBAASSHH__AARRGGVV
|
||||
An array variable containing all of the parameters in the cur-
|
||||
An array variable containing all of the parameters in the cur-
|
||||
rent bbaasshh execution call stack. The final parameter of the last
|
||||
subroutine call is at the top of the stack; the first parameter
|
||||
subroutine call is at the top of the stack; the first parameter
|
||||
of the initial call is at the bottom. When a subroutine is exe-
|
||||
cuted, the parameters supplied are pushed onto BBAASSHH__AARRGGVV. The
|
||||
shell sets BBAASSHH__AARRGGVV only when in extended debugging mode (see
|
||||
the description of the eexxttddeebbuugg option to the sshhoopptt builtin
|
||||
cuted, the parameters supplied are pushed onto BBAASSHH__AARRGGVV. The
|
||||
shell sets BBAASSHH__AARRGGVV only when in extended debugging mode (see
|
||||
the description of the eexxttddeebbuugg option to the sshhoopptt builtin
|
||||
below). Setting eexxttddeebbuugg after the shell has started to execute
|
||||
a script may result in inconsistent values.
|
||||
a script, or referencing this variable when eexxttddeebbuugg is not set,
|
||||
may result in inconsistent values.
|
||||
BBAASSHH__AARRGGVV00
|
||||
When referenced, this variable expands to the name of the shell
|
||||
or shell script (identical to $$00; see the description of special
|
||||
@@ -1603,18 +1605,18 @@ EEXXPPAANNSSIIOONN
|
||||
(AArrrraayyss).
|
||||
|
||||
If the first character of _p_a_r_a_m_e_t_e_r is an exclamation point (!!), and
|
||||
_p_a_r_a_m_e_t_e_r is not a _n_a_m_e_r_e_f, it introduces a level of variable indirec-
|
||||
tion. BBaasshh uses the value of the variable formed from the rest of
|
||||
_p_a_r_a_m_e_t_e_r as the name of the variable; this variable is then expanded
|
||||
and that value is used in the rest of the substitution, rather than the
|
||||
value of _p_a_r_a_m_e_t_e_r itself. This is known as _i_n_d_i_r_e_c_t _e_x_p_a_n_s_i_o_n. The
|
||||
value is subject to tilde expansion, parameter expansion, command sub-
|
||||
stitution, and arithmetic expansion. If _p_a_r_a_m_e_t_e_r is a nameref, this
|
||||
expands to the name of the variable referenced by _p_a_r_a_m_e_t_e_r instead of
|
||||
performing the complete indirect expansion. The exceptions to this are
|
||||
the expansions of ${!!_p_r_e_f_i_x**} and ${!!_n_a_m_e[_@]} described below. The
|
||||
exclamation point must immediately follow the left brace in order to
|
||||
introduce indirection.
|
||||
_p_a_r_a_m_e_t_e_r is not a _n_a_m_e_r_e_f, it introduces a level of indirection. BBaasshh
|
||||
uses the value formed by expanding the rest of _p_a_r_a_m_e_t_e_r as the new
|
||||
_p_a_r_a_m_e_t_e_r; this is then expanded and that value is used in the rest of
|
||||
the expansion, rather than the expansion of the original _p_a_r_a_m_e_t_e_r.
|
||||
This is known as _i_n_d_i_r_e_c_t _e_x_p_a_n_s_i_o_n. The value is subject to tilde
|
||||
expansion, parameter expansion, command substitution, and arithmetic
|
||||
expansion. If _p_a_r_a_m_e_t_e_r is a nameref, this expands to the name of the
|
||||
parameter referenced by _p_a_r_a_m_e_t_e_r instead of performing the complete
|
||||
indirect expansion. The exceptions to this are the expansions of
|
||||
${!!_p_r_e_f_i_x**} and ${!!_n_a_m_e[_@]} described below. The exclamation point
|
||||
must immediately follow the left brace in order to introduce indirec-
|
||||
tion.
|
||||
|
||||
In each of the cases below, _w_o_r_d is subject to tilde expansion, parame-
|
||||
ter expansion, command substitution, and arithmetic expansion.
|
||||
|
||||
@@ -2286,6 +2286,11 @@ startup file, overriding the default of
|
||||
.B READLINE
|
||||
below).
|
||||
.TP
|
||||
.B INSIDE_EMACS
|
||||
If this variable appears in the environment when the shell starts,
|
||||
\fBbash\fP assumes that it is running inside an Emacs shell buffer
|
||||
and may disable line editing, depending on the value of \fBTERM\fP.
|
||||
.TP
|
||||
.B LANG
|
||||
Used to determine the locale category for any category not specifically
|
||||
selected with a variable starting with \fBLC_\fP.
|
||||
|
||||
+12
-10
@@ -965,7 +965,7 @@ to be matched as a string.
|
||||
An additional binary operator, <B>=~</B>, is available, with the same
|
||||
precedence as <B>==</B> and <B>!=</B>.
|
||||
When it is used, the string to the right of the operator is considered
|
||||
an extended regular expression and matched accordingly (as in <I>regex</I>(3)).
|
||||
a POSIX extended regular expression and matched accordingly (as in <I>regex</I>(3)).
|
||||
The return value is 0 if the string matches
|
||||
the pattern, and 1 otherwise.
|
||||
If the regular expression is syntactically incorrect, the conditional
|
||||
@@ -1929,7 +1929,8 @@ option to the
|
||||
<B>shopt</B>
|
||||
|
||||
builtin below).
|
||||
Setting <B>extdebug</B> after the shell has started to execute a script
|
||||
Setting <B>extdebug</B> after the shell has started to execute a script,
|
||||
or referencing this variable when <B>extdebug</B> is not set,
|
||||
may result in inconsistent values.
|
||||
<DT><B>BASH_ARGV</B>
|
||||
|
||||
@@ -1954,7 +1955,8 @@ option to the
|
||||
<B>shopt</B>
|
||||
|
||||
builtin below).
|
||||
Setting <B>extdebug</B> after the shell has started to execute a script
|
||||
Setting <B>extdebug</B> after the shell has started to execute a script,
|
||||
or referencing this variable when <B>extdebug</B> is not set,
|
||||
may result in inconsistent values.
|
||||
<DT><B>BASH_ARGV0</B>
|
||||
|
||||
@@ -3745,16 +3747,16 @@ The <I>parameter</I> is a shell parameter as described above
|
||||
|
||||
If the first character of <I>parameter</I> is an exclamation point (<B>!</B>),
|
||||
and <I>parameter</I> is not a <I>nameref</I>,
|
||||
it introduces a level of variable indirection.
|
||||
<B>Bash</B> uses the value of the variable formed from the rest of
|
||||
<I>parameter</I> as the name of the variable; this variable is then
|
||||
expanded and that value is used in the rest of the substitution, rather
|
||||
than the value of <I>parameter</I> itself.
|
||||
it introduces a level of indirection.
|
||||
<B>Bash</B> uses the value formed by expanding the rest of
|
||||
<I>parameter</I> as the new <I>parameter</I>; this is then
|
||||
expanded and that value is used in the rest of the expansion, rather
|
||||
than the expansion of the original <I>parameter</I>.
|
||||
This is known as <I>indirect expansion</I>.
|
||||
The value is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
If <I>parameter</I> is a nameref, this expands to the name of the
|
||||
variable referenced by <I>parameter</I> instead of performing the
|
||||
parameter referenced by <I>parameter</I> instead of performing the
|
||||
complete indirect expansion.
|
||||
The exceptions to this are the expansions of ${<B>!</B><I>prefix</I><B>*</B>} and
|
||||
${<B>!</B><I>name</I>[<I>@</I>]} described below.
|
||||
@@ -13975,6 +13977,6 @@ There may be only one active coprocess at a time.
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 12 June 2018 15:50:58 EDT
|
||||
Time: 16 July 2018 10:36:49 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+245
-233
@@ -890,25 +890,25 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
|
||||
|
||||
An additional binary operator, '=~', is available, with the same
|
||||
precedence as '==' and '!='. When it is used, the string to the
|
||||
right of the operator is considered an extended regular expression
|
||||
and matched accordingly (as in regex3)). The return value is 0 if
|
||||
the string matches the pattern, and 1 otherwise. If the regular
|
||||
expression is syntactically incorrect, the conditional expression's
|
||||
return value is 2. If the 'nocasematch' shell option (see the
|
||||
description of 'shopt' in *note The Shopt Builtin::) is enabled,
|
||||
the match is performed without regard to the case of alphabetic
|
||||
characters. Any part of the pattern may be quoted to force the
|
||||
quoted portion to be matched as a string. Bracket expressions in
|
||||
regular expressions must be treated carefully, since normal quoting
|
||||
characters lose their meanings between brackets. If the pattern is
|
||||
stored in a shell variable, quoting the variable expansion forces
|
||||
the entire pattern to be matched as a string. Substrings matched
|
||||
by parenthesized subexpressions within the regular expression are
|
||||
saved in the array variable 'BASH_REMATCH'. The element of
|
||||
'BASH_REMATCH' with index 0 is the portion of the string matching
|
||||
the entire regular expression. The element of 'BASH_REMATCH' with
|
||||
index N is the portion of the string matching the Nth parenthesized
|
||||
subexpression.
|
||||
right of the operator is considered a POSIX extended regular
|
||||
expression and matched accordingly (as in regex3)). The return
|
||||
value is 0 if the string matches the pattern, and 1 otherwise. If
|
||||
the regular expression is syntactically incorrect, the conditional
|
||||
expression's return value is 2. If the 'nocasematch' shell option
|
||||
(see the description of 'shopt' in *note The Shopt Builtin::) is
|
||||
enabled, the match is performed without regard to the case of
|
||||
alphabetic characters. Any part of the pattern may be quoted to
|
||||
force the quoted portion to be matched as a string. Bracket
|
||||
expressions in regular expressions must be treated carefully, since
|
||||
normal quoting characters lose their meanings between brackets. If
|
||||
the pattern is stored in a shell variable, quoting the variable
|
||||
expansion forces the entire pattern to be matched as a string.
|
||||
Substrings matched by parenthesized subexpressions within the
|
||||
regular expression are saved in the array variable 'BASH_REMATCH'.
|
||||
The element of 'BASH_REMATCH' with index 0 is the portion of the
|
||||
string matching the entire regular expression. The element of
|
||||
'BASH_REMATCH' with index N is the portion of the string matching
|
||||
the Nth parenthesized subexpression.
|
||||
|
||||
For example, the following will match a line (stored in the shell
|
||||
variable LINE) if there is a sequence of characters in the value
|
||||
@@ -1670,18 +1670,17 @@ parameter with more than one digit, or when PARAMETER is followed by a
|
||||
character that is not to be interpreted as part of its name.
|
||||
|
||||
If the first character of PARAMETER is an exclamation point (!), and
|
||||
PARAMETER is not a NAMEREF, it introduces a level of variable
|
||||
indirection. Bash uses the value of the variable formed from the rest
|
||||
of PARAMETER as the name of the variable; this variable is then expanded
|
||||
and that value is used in the rest of the substitution, rather than the
|
||||
value of PARAMETER itself. This is known as 'indirect expansion'. The
|
||||
value is subject to tilde expansion, parameter expansion, command
|
||||
substitution, and arithmetic expansion. If PARAMETER is a nameref, this
|
||||
expands to the name of the variable referenced by PARAMETER instead of
|
||||
performing the complete indirect expansion. The exceptions to this are
|
||||
the expansions of ${!PREFIX*} and ${!NAME[@]} described below. The
|
||||
exclamation point must immediately follow the left brace in order to
|
||||
introduce indirection.
|
||||
PARAMETER is not a NAMEREF, it introduces a level of indirection. Bash
|
||||
uses the value formed by expanding the rest of PARAMETER as the new
|
||||
PARAMETER; this is then expanded and that value is used in the rest of
|
||||
the expansion, rather than the expansion of the original PARAMETER.
|
||||
This is known as 'indirect expansion'. The value is subject to tilde
|
||||
expansion, parameter expansion, command substitution, and arithmetic
|
||||
expansion. If PARAMETER is a nameref, this expands to the name of the
|
||||
variable referenced by PARAMETER instead of performing the complete
|
||||
indirect expansion. The exceptions to this are the expansions of
|
||||
${!PREFIX*} and ${!NAME[@]} described below. The exclamation point must
|
||||
immediately follow the left brace in order to introduce indirection.
|
||||
|
||||
In each of the cases below, WORD is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
@@ -4843,7 +4842,8 @@ Variables::).
|
||||
onto 'BASH_ARGC'. The shell sets 'BASH_ARGC' only when in extended
|
||||
debugging mode (see *note The Shopt Builtin:: for a description of
|
||||
the 'extdebug' option to the 'shopt' builtin). Setting 'extdebug'
|
||||
after the shell has started to execute a script may result in
|
||||
after the shell has started to execute a script, or referencing
|
||||
this variable when 'extdebug' is not set, may result in
|
||||
inconsistent values.
|
||||
|
||||
'BASH_ARGV'
|
||||
@@ -4855,7 +4855,8 @@ Variables::).
|
||||
sets 'BASH_ARGV' only when in extended debugging mode (see *note
|
||||
The Shopt Builtin:: for a description of the 'extdebug' option to
|
||||
the 'shopt' builtin). Setting 'extdebug' after the shell has
|
||||
started to execute a script may result in inconsistent values.
|
||||
started to execute a script, or referencing this variable when
|
||||
'extdebug' is not set, may result in inconsistent values.
|
||||
|
||||
'BASH_ARGV0'
|
||||
When referenced, this variable expands to the name of the shell or
|
||||
@@ -9294,7 +9295,8 @@ previous commands quickly.
|
||||
|
||||
History expansion is performed immediately after a complete line is
|
||||
read, before the shell breaks it into words, and is performed on each
|
||||
line individually without taking quoting on previous lines into account.
|
||||
line individually. Bash attempts to inform the history expansion
|
||||
functions about quoting still in effect from previous lines.
|
||||
|
||||
History expansion takes place in two parts. The first is to
|
||||
determine which line from the history list should be used during
|
||||
@@ -9305,10 +9307,20 @@ are called "words". Various "modifiers" are available to manipulate the
|
||||
selected words. The line is broken into words in the same fashion that
|
||||
Bash does, so that several words surrounded by quotes are considered one
|
||||
word. History expansions are introduced by the appearance of the
|
||||
history expansion character, which is '!' by default. Only '\' and '''
|
||||
may be used to escape the history expansion character, but the history
|
||||
expansion character is also treated as quoted if it immediately precedes
|
||||
the closing double quote in a double-quoted string.
|
||||
history expansion character, which is '!' by default.
|
||||
|
||||
History expansion implements shell-like quoting conventions: a
|
||||
backslash can be used to remove the special handling for the next
|
||||
character; single quotes enclose verbatim sequences of characters, and
|
||||
can be used to inhibit history expansion; and characters enclosed within
|
||||
double quotes may be subject to history expansion, since backslash can
|
||||
escape the history expansion character, but single quotes may not, since
|
||||
they are not treated specially within double quotes.
|
||||
|
||||
When using the shell, only '\' and ''' may be used to escape the
|
||||
history expansion character, but the history expansion character is also
|
||||
treated as quoted if it immediately precedes the closing double quote in
|
||||
a double-quoted string.
|
||||
|
||||
Several shell options settable with the 'shopt' builtin (*note The
|
||||
Shopt Builtin::) may be used to tailor the behavior of history
|
||||
@@ -11062,21 +11074,21 @@ D.3 Parameter and Variable Index
|
||||
* BASHPID: Bash Variables. (line 25)
|
||||
* BASH_ALIASES: Bash Variables. (line 32)
|
||||
* BASH_ARGC: Bash Variables. (line 41)
|
||||
* BASH_ARGV: Bash Variables. (line 53)
|
||||
* BASH_ARGV0: Bash Variables. (line 64)
|
||||
* BASH_CMDS: Bash Variables. (line 72)
|
||||
* BASH_COMMAND: Bash Variables. (line 81)
|
||||
* BASH_COMPAT: Bash Variables. (line 86)
|
||||
* BASH_ENV: Bash Variables. (line 101)
|
||||
* BASH_EXECUTION_STRING: Bash Variables. (line 107)
|
||||
* BASH_LINENO: Bash Variables. (line 110)
|
||||
* BASH_LOADABLES_PATH: Bash Variables. (line 118)
|
||||
* BASH_REMATCH: Bash Variables. (line 122)
|
||||
* BASH_SOURCE: Bash Variables. (line 130)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 137)
|
||||
* BASH_VERSINFO: Bash Variables. (line 142)
|
||||
* BASH_VERSION: Bash Variables. (line 165)
|
||||
* BASH_XTRACEFD: Bash Variables. (line 168)
|
||||
* BASH_ARGV: Bash Variables. (line 54)
|
||||
* BASH_ARGV0: Bash Variables. (line 66)
|
||||
* BASH_CMDS: Bash Variables. (line 74)
|
||||
* BASH_COMMAND: Bash Variables. (line 83)
|
||||
* BASH_COMPAT: Bash Variables. (line 88)
|
||||
* BASH_ENV: Bash Variables. (line 103)
|
||||
* BASH_EXECUTION_STRING: Bash Variables. (line 109)
|
||||
* BASH_LINENO: Bash Variables. (line 112)
|
||||
* BASH_LOADABLES_PATH: Bash Variables. (line 120)
|
||||
* BASH_REMATCH: Bash Variables. (line 124)
|
||||
* BASH_SOURCE: Bash Variables. (line 132)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 139)
|
||||
* BASH_VERSINFO: Bash Variables. (line 144)
|
||||
* BASH_VERSION: Bash Variables. (line 167)
|
||||
* BASH_XTRACEFD: Bash Variables. (line 170)
|
||||
* bell-style: Readline Init File Syntax.
|
||||
(line 38)
|
||||
* bind-tty-special-chars: Readline Init File Syntax.
|
||||
@@ -11085,12 +11097,12 @@ D.3 Parameter and Variable Index
|
||||
(line 50)
|
||||
* CDPATH: Bourne Shell Variables.
|
||||
(line 9)
|
||||
* CHILD_MAX: Bash Variables. (line 179)
|
||||
* CHILD_MAX: Bash Variables. (line 181)
|
||||
* colored-completion-prefix: Readline Init File Syntax.
|
||||
(line 55)
|
||||
* colored-stats: Readline Init File Syntax.
|
||||
(line 62)
|
||||
* COLUMNS: Bash Variables. (line 186)
|
||||
* COLUMNS: Bash Variables. (line 188)
|
||||
* comment-begin: Readline Init File Syntax.
|
||||
(line 68)
|
||||
* completion-display-width: Readline Init File Syntax.
|
||||
@@ -11103,90 +11115,90 @@ D.3 Parameter and Variable Index
|
||||
(line 91)
|
||||
* completion-query-items: Readline Init File Syntax.
|
||||
(line 98)
|
||||
* COMPREPLY: Bash Variables. (line 238)
|
||||
* COMP_CWORD: Bash Variables. (line 192)
|
||||
* COMP_KEY: Bash Variables. (line 221)
|
||||
* COMP_LINE: Bash Variables. (line 198)
|
||||
* COMP_POINT: Bash Variables. (line 203)
|
||||
* COMP_TYPE: Bash Variables. (line 211)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 225)
|
||||
* COMP_WORDS: Bash Variables. (line 231)
|
||||
* COMPREPLY: Bash Variables. (line 240)
|
||||
* COMP_CWORD: Bash Variables. (line 194)
|
||||
* COMP_KEY: Bash Variables. (line 223)
|
||||
* COMP_LINE: Bash Variables. (line 200)
|
||||
* COMP_POINT: Bash Variables. (line 205)
|
||||
* COMP_TYPE: Bash Variables. (line 213)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 227)
|
||||
* COMP_WORDS: Bash Variables. (line 233)
|
||||
* convert-meta: Readline Init File Syntax.
|
||||
(line 108)
|
||||
* COPROC: Bash Variables. (line 244)
|
||||
* DIRSTACK: Bash Variables. (line 248)
|
||||
* COPROC: Bash Variables. (line 246)
|
||||
* DIRSTACK: Bash Variables. (line 250)
|
||||
* disable-completion: Readline Init File Syntax.
|
||||
(line 116)
|
||||
* echo-control-characters: Readline Init File Syntax.
|
||||
(line 121)
|
||||
* editing-mode: Readline Init File Syntax.
|
||||
(line 126)
|
||||
* EMACS: Bash Variables. (line 258)
|
||||
* EMACS: Bash Variables. (line 260)
|
||||
* emacs-mode-string: Readline Init File Syntax.
|
||||
(line 132)
|
||||
* enable-bracketed-paste: Readline Init File Syntax.
|
||||
(line 142)
|
||||
* enable-keypad: Readline Init File Syntax.
|
||||
(line 150)
|
||||
* ENV: Bash Variables. (line 263)
|
||||
* EPOCHREALTIME: Bash Variables. (line 267)
|
||||
* EPOCHSECONDS: Bash Variables. (line 275)
|
||||
* EUID: Bash Variables. (line 282)
|
||||
* EXECIGNORE: Bash Variables. (line 286)
|
||||
* ENV: Bash Variables. (line 265)
|
||||
* EPOCHREALTIME: Bash Variables. (line 269)
|
||||
* EPOCHSECONDS: Bash Variables. (line 277)
|
||||
* EUID: Bash Variables. (line 284)
|
||||
* EXECIGNORE: Bash Variables. (line 288)
|
||||
* expand-tilde: Readline Init File Syntax.
|
||||
(line 161)
|
||||
* FCEDIT: Bash Variables. (line 299)
|
||||
* FIGNORE: Bash Variables. (line 303)
|
||||
* FUNCNAME: Bash Variables. (line 309)
|
||||
* FUNCNEST: Bash Variables. (line 326)
|
||||
* GLOBIGNORE: Bash Variables. (line 331)
|
||||
* GROUPS: Bash Variables. (line 338)
|
||||
* histchars: Bash Variables. (line 344)
|
||||
* HISTCMD: Bash Variables. (line 359)
|
||||
* HISTCONTROL: Bash Variables. (line 364)
|
||||
* HISTFILE: Bash Variables. (line 380)
|
||||
* HISTFILESIZE: Bash Variables. (line 384)
|
||||
* HISTIGNORE: Bash Variables. (line 395)
|
||||
* FCEDIT: Bash Variables. (line 301)
|
||||
* FIGNORE: Bash Variables. (line 305)
|
||||
* FUNCNAME: Bash Variables. (line 311)
|
||||
* FUNCNEST: Bash Variables. (line 328)
|
||||
* GLOBIGNORE: Bash Variables. (line 333)
|
||||
* GROUPS: Bash Variables. (line 340)
|
||||
* histchars: Bash Variables. (line 346)
|
||||
* HISTCMD: Bash Variables. (line 361)
|
||||
* HISTCONTROL: Bash Variables. (line 366)
|
||||
* HISTFILE: Bash Variables. (line 382)
|
||||
* HISTFILESIZE: Bash Variables. (line 386)
|
||||
* HISTIGNORE: Bash Variables. (line 397)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 165)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 171)
|
||||
* HISTSIZE: Bash Variables. (line 415)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 422)
|
||||
* HISTSIZE: Bash Variables. (line 417)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 424)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 180)
|
||||
* HOSTFILE: Bash Variables. (line 430)
|
||||
* HOSTNAME: Bash Variables. (line 441)
|
||||
* HOSTTYPE: Bash Variables. (line 444)
|
||||
* HOSTFILE: Bash Variables. (line 432)
|
||||
* HOSTNAME: Bash Variables. (line 443)
|
||||
* HOSTTYPE: Bash Variables. (line 446)
|
||||
* IFS: Bourne Shell Variables.
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 447)
|
||||
* IGNOREEOF: Bash Variables. (line 449)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 187)
|
||||
* INPUTRC: Bash Variables. (line 457)
|
||||
* INPUTRC: Bash Variables. (line 459)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 195)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 202)
|
||||
* LANG: Bash Variables. (line 461)
|
||||
* LC_ALL: Bash Variables. (line 465)
|
||||
* LC_COLLATE: Bash Variables. (line 469)
|
||||
* LC_CTYPE: Bash Variables. (line 476)
|
||||
* LANG: Bash Variables. (line 463)
|
||||
* LC_ALL: Bash Variables. (line 467)
|
||||
* LC_COLLATE: Bash Variables. (line 471)
|
||||
* LC_CTYPE: Bash Variables. (line 478)
|
||||
* LC_MESSAGES: Locale Translation. (line 11)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 481)
|
||||
* LC_NUMERIC: Bash Variables. (line 485)
|
||||
* LC_TIME: Bash Variables. (line 489)
|
||||
* LINENO: Bash Variables. (line 493)
|
||||
* LINES: Bash Variables. (line 497)
|
||||
* MACHTYPE: Bash Variables. (line 503)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 483)
|
||||
* LC_NUMERIC: Bash Variables. (line 487)
|
||||
* LC_TIME: Bash Variables. (line 491)
|
||||
* LINENO: Bash Variables. (line 495)
|
||||
* LINES: Bash Variables. (line 499)
|
||||
* MACHTYPE: Bash Variables. (line 505)
|
||||
* MAIL: Bourne Shell Variables.
|
||||
(line 22)
|
||||
* MAILCHECK: Bash Variables. (line 507)
|
||||
* MAILCHECK: Bash Variables. (line 509)
|
||||
* MAILPATH: Bourne Shell Variables.
|
||||
(line 27)
|
||||
* MAPFILE: Bash Variables. (line 515)
|
||||
* MAPFILE: Bash Variables. (line 517)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 232)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
@@ -11197,42 +11209,42 @@ D.3 Parameter and Variable Index
|
||||
(line 249)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 187)
|
||||
* OLDPWD: Bash Variables. (line 519)
|
||||
* OLDPWD: Bash Variables. (line 521)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 34)
|
||||
* OPTERR: Bash Variables. (line 522)
|
||||
* OPTERR: Bash Variables. (line 524)
|
||||
* OPTIND: Bourne Shell Variables.
|
||||
(line 38)
|
||||
* OSTYPE: Bash Variables. (line 526)
|
||||
* OSTYPE: Bash Variables. (line 528)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 254)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 260)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 42)
|
||||
* PIPESTATUS: Bash Variables. (line 529)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 534)
|
||||
* PPID: Bash Variables. (line 543)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 547)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 551)
|
||||
* PS0: Bash Variables. (line 557)
|
||||
* PIPESTATUS: Bash Variables. (line 531)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 536)
|
||||
* PPID: Bash Variables. (line 545)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 549)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 553)
|
||||
* PS0: Bash Variables. (line 559)
|
||||
* PS1: Bourne Shell Variables.
|
||||
(line 48)
|
||||
* PS2: Bourne Shell Variables.
|
||||
(line 53)
|
||||
* PS3: Bash Variables. (line 562)
|
||||
* PS4: Bash Variables. (line 567)
|
||||
* PWD: Bash Variables. (line 575)
|
||||
* RANDOM: Bash Variables. (line 578)
|
||||
* READLINE_LINE: Bash Variables. (line 583)
|
||||
* READLINE_POINT: Bash Variables. (line 587)
|
||||
* REPLY: Bash Variables. (line 591)
|
||||
* PS3: Bash Variables. (line 564)
|
||||
* PS4: Bash Variables. (line 569)
|
||||
* PWD: Bash Variables. (line 577)
|
||||
* RANDOM: Bash Variables. (line 580)
|
||||
* READLINE_LINE: Bash Variables. (line 585)
|
||||
* READLINE_POINT: Bash Variables. (line 589)
|
||||
* REPLY: Bash Variables. (line 593)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 270)
|
||||
* SECONDS: Bash Variables. (line 594)
|
||||
* SHELL: Bash Variables. (line 600)
|
||||
* SHELLOPTS: Bash Variables. (line 605)
|
||||
* SHLVL: Bash Variables. (line 614)
|
||||
* SECONDS: Bash Variables. (line 596)
|
||||
* SHELL: Bash Variables. (line 602)
|
||||
* SHELLOPTS: Bash Variables. (line 607)
|
||||
* SHLVL: Bash Variables. (line 616)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 276)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
@@ -11243,10 +11255,10 @@ D.3 Parameter and Variable Index
|
||||
(line 297)
|
||||
* TEXTDOMAIN: Locale Translation. (line 11)
|
||||
* TEXTDOMAINDIR: Locale Translation. (line 11)
|
||||
* TIMEFORMAT: Bash Variables. (line 619)
|
||||
* TMOUT: Bash Variables. (line 657)
|
||||
* TMPDIR: Bash Variables. (line 669)
|
||||
* UID: Bash Variables. (line 673)
|
||||
* TIMEFORMAT: Bash Variables. (line 621)
|
||||
* TMOUT: Bash Variables. (line 659)
|
||||
* TMPDIR: Bash Variables. (line 671)
|
||||
* UID: Bash Variables. (line 675)
|
||||
* vi-cmd-mode-string: Readline Init File Syntax.
|
||||
(line 310)
|
||||
* vi-ins-mode-string: Readline Init File Syntax.
|
||||
@@ -11637,112 +11649,112 @@ Node: Lists23773
|
||||
Node: Compound Commands25512
|
||||
Node: Looping Constructs26524
|
||||
Node: Conditional Constructs29019
|
||||
Node: Command Grouping40099
|
||||
Node: Coprocesses41578
|
||||
Node: GNU Parallel43481
|
||||
Node: Shell Functions47539
|
||||
Node: Shell Parameters54622
|
||||
Node: Positional Parameters59035
|
||||
Node: Special Parameters59935
|
||||
Node: Shell Expansions63649
|
||||
Node: Brace Expansion65772
|
||||
Node: Tilde Expansion68496
|
||||
Node: Shell Parameter Expansion70844
|
||||
Node: Command Substitution85327
|
||||
Node: Arithmetic Expansion86682
|
||||
Node: Process Substitution87614
|
||||
Node: Word Splitting88734
|
||||
Node: Filename Expansion90678
|
||||
Node: Pattern Matching93208
|
||||
Node: Quote Removal97194
|
||||
Node: Redirections97489
|
||||
Node: Executing Commands107047
|
||||
Node: Simple Command Expansion107717
|
||||
Node: Command Search and Execution109647
|
||||
Node: Command Execution Environment112023
|
||||
Node: Environment115007
|
||||
Node: Exit Status116666
|
||||
Node: Signals118336
|
||||
Node: Shell Scripts120303
|
||||
Node: Shell Builtin Commands122818
|
||||
Node: Bourne Shell Builtins124856
|
||||
Node: Bash Builtins145514
|
||||
Node: Modifying Shell Behavior174422
|
||||
Node: The Set Builtin174767
|
||||
Node: The Shopt Builtin185180
|
||||
Node: Special Builtins202050
|
||||
Node: Shell Variables203029
|
||||
Node: Bourne Shell Variables203466
|
||||
Node: Bash Variables205570
|
||||
Node: Bash Features235584
|
||||
Node: Invoking Bash236483
|
||||
Node: Bash Startup Files242496
|
||||
Node: Interactive Shells247599
|
||||
Node: What is an Interactive Shell?248009
|
||||
Node: Is this Shell Interactive?248658
|
||||
Node: Interactive Shell Behavior249473
|
||||
Node: Bash Conditional Expressions252960
|
||||
Node: Shell Arithmetic257326
|
||||
Node: Aliases260143
|
||||
Node: Arrays262691
|
||||
Node: The Directory Stack268057
|
||||
Node: Directory Stack Builtins268841
|
||||
Node: Controlling the Prompt271809
|
||||
Node: The Restricted Shell274575
|
||||
Node: Bash POSIX Mode276400
|
||||
Node: Job Control286751
|
||||
Node: Job Control Basics287211
|
||||
Node: Job Control Builtins292179
|
||||
Node: Job Control Variables296906
|
||||
Node: Command Line Editing298062
|
||||
Node: Introduction and Notation299733
|
||||
Node: Readline Interaction301356
|
||||
Node: Readline Bare Essentials302547
|
||||
Node: Readline Movement Commands304330
|
||||
Node: Readline Killing Commands305290
|
||||
Node: Readline Arguments307208
|
||||
Node: Searching308252
|
||||
Node: Readline Init File310438
|
||||
Node: Readline Init File Syntax311585
|
||||
Node: Conditional Init Constructs331985
|
||||
Node: Sample Init File336181
|
||||
Node: Bindable Readline Commands339298
|
||||
Node: Commands For Moving340502
|
||||
Node: Commands For History342351
|
||||
Node: Commands For Text346646
|
||||
Node: Commands For Killing350034
|
||||
Node: Numeric Arguments352515
|
||||
Node: Commands For Completion353654
|
||||
Node: Keyboard Macros357845
|
||||
Node: Miscellaneous Commands358532
|
||||
Node: Readline vi Mode364485
|
||||
Node: Programmable Completion365392
|
||||
Node: Programmable Completion Builtins372986
|
||||
Node: A Programmable Completion Example383514
|
||||
Node: Using History Interactively388754
|
||||
Node: Bash History Facilities389438
|
||||
Node: Bash History Builtins392443
|
||||
Node: History Interaction396974
|
||||
Node: Event Designators400041
|
||||
Node: Word Designators401260
|
||||
Node: Modifiers402897
|
||||
Node: Installing Bash404299
|
||||
Node: Basic Installation405436
|
||||
Node: Compilers and Options408694
|
||||
Node: Compiling For Multiple Architectures409435
|
||||
Node: Installation Names411128
|
||||
Node: Specifying the System Type411946
|
||||
Node: Sharing Defaults412662
|
||||
Node: Operation Controls413335
|
||||
Node: Optional Features414293
|
||||
Node: Reporting Bugs424811
|
||||
Node: Major Differences From The Bourne Shell426005
|
||||
Node: GNU Free Documentation License442857
|
||||
Node: Indexes468034
|
||||
Node: Builtin Index468488
|
||||
Node: Reserved Word Index475315
|
||||
Node: Variable Index477763
|
||||
Node: Function Index493441
|
||||
Node: Concept Index506744
|
||||
Node: Command Grouping40102
|
||||
Node: Coprocesses41581
|
||||
Node: GNU Parallel43484
|
||||
Node: Shell Functions47542
|
||||
Node: Shell Parameters54625
|
||||
Node: Positional Parameters59038
|
||||
Node: Special Parameters59938
|
||||
Node: Shell Expansions63652
|
||||
Node: Brace Expansion65775
|
||||
Node: Tilde Expansion68499
|
||||
Node: Shell Parameter Expansion70847
|
||||
Node: Command Substitution85303
|
||||
Node: Arithmetic Expansion86658
|
||||
Node: Process Substitution87590
|
||||
Node: Word Splitting88710
|
||||
Node: Filename Expansion90654
|
||||
Node: Pattern Matching93184
|
||||
Node: Quote Removal97170
|
||||
Node: Redirections97465
|
||||
Node: Executing Commands107023
|
||||
Node: Simple Command Expansion107693
|
||||
Node: Command Search and Execution109623
|
||||
Node: Command Execution Environment111999
|
||||
Node: Environment114983
|
||||
Node: Exit Status116642
|
||||
Node: Signals118312
|
||||
Node: Shell Scripts120279
|
||||
Node: Shell Builtin Commands122794
|
||||
Node: Bourne Shell Builtins124832
|
||||
Node: Bash Builtins145490
|
||||
Node: Modifying Shell Behavior174398
|
||||
Node: The Set Builtin174743
|
||||
Node: The Shopt Builtin185156
|
||||
Node: Special Builtins202026
|
||||
Node: Shell Variables203005
|
||||
Node: Bourne Shell Variables203442
|
||||
Node: Bash Variables205546
|
||||
Node: Bash Features235686
|
||||
Node: Invoking Bash236585
|
||||
Node: Bash Startup Files242598
|
||||
Node: Interactive Shells247701
|
||||
Node: What is an Interactive Shell?248111
|
||||
Node: Is this Shell Interactive?248760
|
||||
Node: Interactive Shell Behavior249575
|
||||
Node: Bash Conditional Expressions253062
|
||||
Node: Shell Arithmetic257428
|
||||
Node: Aliases260245
|
||||
Node: Arrays262793
|
||||
Node: The Directory Stack268159
|
||||
Node: Directory Stack Builtins268943
|
||||
Node: Controlling the Prompt271911
|
||||
Node: The Restricted Shell274677
|
||||
Node: Bash POSIX Mode276502
|
||||
Node: Job Control286853
|
||||
Node: Job Control Basics287313
|
||||
Node: Job Control Builtins292281
|
||||
Node: Job Control Variables297008
|
||||
Node: Command Line Editing298164
|
||||
Node: Introduction and Notation299835
|
||||
Node: Readline Interaction301458
|
||||
Node: Readline Bare Essentials302649
|
||||
Node: Readline Movement Commands304432
|
||||
Node: Readline Killing Commands305392
|
||||
Node: Readline Arguments307310
|
||||
Node: Searching308354
|
||||
Node: Readline Init File310540
|
||||
Node: Readline Init File Syntax311687
|
||||
Node: Conditional Init Constructs332087
|
||||
Node: Sample Init File336283
|
||||
Node: Bindable Readline Commands339400
|
||||
Node: Commands For Moving340604
|
||||
Node: Commands For History342453
|
||||
Node: Commands For Text346748
|
||||
Node: Commands For Killing350136
|
||||
Node: Numeric Arguments352617
|
||||
Node: Commands For Completion353756
|
||||
Node: Keyboard Macros357947
|
||||
Node: Miscellaneous Commands358634
|
||||
Node: Readline vi Mode364587
|
||||
Node: Programmable Completion365494
|
||||
Node: Programmable Completion Builtins373088
|
||||
Node: A Programmable Completion Example383616
|
||||
Node: Using History Interactively388856
|
||||
Node: Bash History Facilities389540
|
||||
Node: Bash History Builtins392545
|
||||
Node: History Interaction397076
|
||||
Node: Event Designators400696
|
||||
Node: Word Designators401915
|
||||
Node: Modifiers403552
|
||||
Node: Installing Bash404954
|
||||
Node: Basic Installation406091
|
||||
Node: Compilers and Options409349
|
||||
Node: Compiling For Multiple Architectures410090
|
||||
Node: Installation Names411783
|
||||
Node: Specifying the System Type412601
|
||||
Node: Sharing Defaults413317
|
||||
Node: Operation Controls413990
|
||||
Node: Optional Features414948
|
||||
Node: Reporting Bugs425466
|
||||
Node: Major Differences From The Bourne Shell426660
|
||||
Node: GNU Free Documentation License443512
|
||||
Node: Indexes468689
|
||||
Node: Builtin Index469143
|
||||
Node: Reserved Word Index475970
|
||||
Node: Variable Index478418
|
||||
Node: Function Index494096
|
||||
Node: Concept Index507399
|
||||
|
||||
End Tag Table
|
||||
|
||||
Binary file not shown.
+3289
-3287
File diff suppressed because it is too large
Load Diff
+18
-18
@@ -332,17 +332,17 @@
|
||||
@xrdef{Installing Bash-snt}{Chapter@tie 10}
|
||||
@xrdef{Basic Installation-title}{Basic Installation}
|
||||
@xrdef{Basic Installation-snt}{Section@tie 10.1}
|
||||
@xrdef{Installing Bash-pg}{145}
|
||||
@xrdef{Basic Installation-pg}{145}
|
||||
@xrdef{Installing Bash-pg}{146}
|
||||
@xrdef{Basic Installation-pg}{146}
|
||||
@xrdef{Compilers and Options-title}{Compilers and Options}
|
||||
@xrdef{Compilers and Options-snt}{Section@tie 10.2}
|
||||
@xrdef{Compiling For Multiple Architectures-title}{Compiling For Multiple Architectures}
|
||||
@xrdef{Compiling For Multiple Architectures-snt}{Section@tie 10.3}
|
||||
@xrdef{Installation Names-title}{Installation Names}
|
||||
@xrdef{Installation Names-snt}{Section@tie 10.4}
|
||||
@xrdef{Compilers and Options-pg}{146}
|
||||
@xrdef{Compiling For Multiple Architectures-pg}{146}
|
||||
@xrdef{Installation Names-pg}{146}
|
||||
@xrdef{Compilers and Options-pg}{147}
|
||||
@xrdef{Compiling For Multiple Architectures-pg}{147}
|
||||
@xrdef{Installation Names-pg}{147}
|
||||
@xrdef{Specifying the System Type-title}{Specifying the System Type}
|
||||
@xrdef{Specifying the System Type-snt}{Section@tie 10.5}
|
||||
@xrdef{Sharing Defaults-title}{Sharing Defaults}
|
||||
@@ -351,34 +351,34 @@
|
||||
@xrdef{Operation Controls-snt}{Section@tie 10.7}
|
||||
@xrdef{Optional Features-title}{Optional Features}
|
||||
@xrdef{Optional Features-snt}{Section@tie 10.8}
|
||||
@xrdef{Specifying the System Type-pg}{147}
|
||||
@xrdef{Sharing Defaults-pg}{147}
|
||||
@xrdef{Operation Controls-pg}{147}
|
||||
@xrdef{Optional Features-pg}{148}
|
||||
@xrdef{Specifying the System Type-pg}{148}
|
||||
@xrdef{Sharing Defaults-pg}{148}
|
||||
@xrdef{Operation Controls-pg}{148}
|
||||
@xrdef{Optional Features-pg}{149}
|
||||
@xrdef{Reporting Bugs-title}{Reporting Bugs}
|
||||
@xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}}
|
||||
@xrdef{Reporting Bugs-pg}{153}
|
||||
@xrdef{Reporting Bugs-pg}{154}
|
||||
@xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell}
|
||||
@xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}}
|
||||
@xrdef{Major Differences From The Bourne Shell-pg}{154}
|
||||
@xrdef{Major Differences From The Bourne Shell-pg}{155}
|
||||
@xrdef{GNU Free Documentation License-title}{GNU Free Documentation License}
|
||||
@xrdef{GNU Free Documentation License-snt}{Appendix@tie @char67{}}
|
||||
@xrdef{GNU Free Documentation License-pg}{160}
|
||||
@xrdef{GNU Free Documentation License-pg}{161}
|
||||
@xrdef{Indexes-title}{Indexes}
|
||||
@xrdef{Indexes-snt}{Appendix@tie @char68{}}
|
||||
@xrdef{Builtin Index-title}{Index of Shell Builtin Commands}
|
||||
@xrdef{Builtin Index-snt}{Section@tie @char68.1}
|
||||
@xrdef{Indexes-pg}{168}
|
||||
@xrdef{Builtin Index-pg}{168}
|
||||
@xrdef{Indexes-pg}{169}
|
||||
@xrdef{Builtin Index-pg}{169}
|
||||
@xrdef{Reserved Word Index-title}{Index of Shell Reserved Words}
|
||||
@xrdef{Reserved Word Index-snt}{Section@tie @char68.2}
|
||||
@xrdef{Variable Index-title}{Parameter and Variable Index}
|
||||
@xrdef{Variable Index-snt}{Section@tie @char68.3}
|
||||
@xrdef{Reserved Word Index-pg}{169}
|
||||
@xrdef{Variable Index-pg}{170}
|
||||
@xrdef{Reserved Word Index-pg}{170}
|
||||
@xrdef{Variable Index-pg}{171}
|
||||
@xrdef{Function Index-title}{Function Index}
|
||||
@xrdef{Function Index-snt}{Section@tie @char68.4}
|
||||
@xrdef{Function Index-pg}{172}
|
||||
@xrdef{Function Index-pg}{173}
|
||||
@xrdef{Concept Index-title}{Concept Index}
|
||||
@xrdef{Concept Index-snt}{Section@tie @char68.5}
|
||||
@xrdef{Concept Index-pg}{174}
|
||||
@xrdef{Concept Index-pg}{175}
|
||||
|
||||
+4
-4
@@ -112,7 +112,7 @@
|
||||
\entry{history expansion}{142}{history expansion}
|
||||
\entry{event designators}{143}{event designators}
|
||||
\entry{history events}{143}{history events}
|
||||
\entry{installation}{145}{installation}
|
||||
\entry{configuration}{145}{configuration}
|
||||
\entry{Bash installation}{145}{Bash installation}
|
||||
\entry{Bash configuration}{145}{Bash configuration}
|
||||
\entry{installation}{146}{installation}
|
||||
\entry{configuration}{146}{configuration}
|
||||
\entry{Bash installation}{146}{Bash installation}
|
||||
\entry{Bash configuration}{146}{Bash configuration}
|
||||
|
||||
+4
-4
@@ -6,8 +6,8 @@
|
||||
\entry {arrays}{93}
|
||||
\initial {B}
|
||||
\entry {background}{102}
|
||||
\entry {Bash configuration}{145}
|
||||
\entry {Bash installation}{145}
|
||||
\entry {Bash configuration}{146}
|
||||
\entry {Bash installation}{146}
|
||||
\entry {Bourne shell}{5}
|
||||
\entry {brace expansion}{23}
|
||||
\entry {builtin}{3}
|
||||
@@ -29,7 +29,7 @@
|
||||
\entry {commands, simple}{8}
|
||||
\entry {comments, shell}{7}
|
||||
\entry {completion builtins}{133}
|
||||
\entry {configuration}{145}
|
||||
\entry {configuration}{146}
|
||||
\entry {control operator}{3}
|
||||
\entry {coprocess}{15}
|
||||
\initial {D}
|
||||
@@ -65,7 +65,7 @@
|
||||
\initial {I}
|
||||
\entry {identifier}{3}
|
||||
\entry {initialization file, readline}{109}
|
||||
\entry {installation}{145}
|
||||
\entry {installation}{146}
|
||||
\entry {interaction, readline}{106}
|
||||
\entry {interactive shell}{86, 87}
|
||||
\entry {internationalization}{7}
|
||||
|
||||
Binary file not shown.
+25
-12
@@ -1452,7 +1452,8 @@ to be matched as a string.
|
||||
<p>An additional binary operator, ‘<samp>=~</samp>’, is available, with the same
|
||||
precedence as ‘<samp>==</samp>’ and ‘<samp>!=</samp>’.
|
||||
When it is used, the string to the right of the operator is considered
|
||||
an extended regular expression and matched accordingly (as in <i>regex</i>3)).
|
||||
a <small>POSIX</small> extended regular expression and matched accordingly
|
||||
(as in <i>regex</i>3)).
|
||||
The return value is 0 if the string matches
|
||||
the pattern, and 1 otherwise.
|
||||
If the regular expression is syntactically incorrect, the conditional
|
||||
@@ -2499,11 +2500,11 @@ interpreted as part of its name.
|
||||
</p>
|
||||
<p>If the first character of <var>parameter</var> is an exclamation point (!),
|
||||
and <var>parameter</var> is not a <var>nameref</var>,
|
||||
it introduces a level of variable indirection.
|
||||
Bash uses the value of the variable formed from the rest of
|
||||
<var>parameter</var> as the name of the variable; this variable is then
|
||||
expanded and that value is used in the rest of the substitution, rather
|
||||
than the value of <var>parameter</var> itself.
|
||||
it introduces a level of indirection.
|
||||
Bash uses the value formed by expanding the rest of
|
||||
<var>parameter</var> as the new <var>parameter</var>; this is then
|
||||
expanded and that value is used in the rest of the expansion, rather
|
||||
than the expansion of the original <var>parameter</var>.
|
||||
This is known as <code>indirect expansion</code>.
|
||||
The value is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
@@ -6593,7 +6594,8 @@ The shell sets <code>BASH_ARGC</code> only when in extended debugging mode
|
||||
(see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>
|
||||
for a description of the <code>extdebug</code> option to the <code>shopt</code>
|
||||
builtin).
|
||||
Setting <code>extdebug</code> after the shell has started to execute a script
|
||||
Setting <code>extdebug</code> after the shell has started to execute a script,
|
||||
or referencing this variable when <code>extdebug</code> is not set,
|
||||
may result in inconsistent values.
|
||||
</p>
|
||||
</dd>
|
||||
@@ -6609,7 +6611,8 @@ The shell sets <code>BASH_ARGV</code> only when in extended debugging mode
|
||||
(see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>
|
||||
for a description of the <code>extdebug</code> option to the <code>shopt</code>
|
||||
builtin).
|
||||
Setting <code>extdebug</code> after the shell has started to execute a script
|
||||
Setting <code>extdebug</code> after the shell has started to execute a script,
|
||||
or referencing this variable when <code>extdebug</code> is not set,
|
||||
may result in inconsistent values.
|
||||
</p>
|
||||
</dd>
|
||||
@@ -12659,8 +12662,8 @@ fix errors in previous commands quickly.
|
||||
</p>
|
||||
<p>History expansion is performed immediately after a complete line
|
||||
is read, before the shell breaks it into words, and is performed
|
||||
on each line individually without taking quoting on previous lines into
|
||||
account.
|
||||
on each line individually. Bash attempts to inform the history
|
||||
expansion functions about quoting still in effect from previous lines.
|
||||
</p>
|
||||
<p>History expansion takes place in two parts. The first is to determine
|
||||
which line from the history list should be used during substitution.
|
||||
@@ -12673,8 +12676,18 @@ that Bash does, so that several words
|
||||
surrounded by quotes are considered one word.
|
||||
History expansions are introduced by the appearance of the
|
||||
history expansion character, which is ‘<samp>!</samp>’ by default.
|
||||
Only ‘<samp>\</samp>’ and ‘<samp>'</samp>’ may be used to escape the history expansion
|
||||
character, but the history expansion character is
|
||||
</p>
|
||||
<p>History expansion implements shell-like quoting conventions:
|
||||
a backslash can be used to remove the special handling for the next character;
|
||||
single quotes enclose verbatim sequences of characters, and can be used to
|
||||
inhibit history expansion;
|
||||
and characters enclosed within double quotes may be subject to history
|
||||
expansion, since backslash can escape the history expansion character,
|
||||
but single quotes may not, since they are not treated specially within
|
||||
double quotes.
|
||||
</p>
|
||||
<p>When using the shell, only ‘<samp>\</samp>’ and ‘<samp>'</samp>’ may be used to escape the
|
||||
history expansion character, but the history expansion character is
|
||||
also treated as quoted if it immediately precedes the closing double quote
|
||||
in a double-quoted string.
|
||||
</p>
|
||||
|
||||
+245
-233
@@ -890,25 +890,25 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
|
||||
|
||||
An additional binary operator, '=~', is available, with the same
|
||||
precedence as '==' and '!='. When it is used, the string to the
|
||||
right of the operator is considered an extended regular expression
|
||||
and matched accordingly (as in regex3)). The return value is 0 if
|
||||
the string matches the pattern, and 1 otherwise. If the regular
|
||||
expression is syntactically incorrect, the conditional expression's
|
||||
return value is 2. If the 'nocasematch' shell option (see the
|
||||
description of 'shopt' in *note The Shopt Builtin::) is enabled,
|
||||
the match is performed without regard to the case of alphabetic
|
||||
characters. Any part of the pattern may be quoted to force the
|
||||
quoted portion to be matched as a string. Bracket expressions in
|
||||
regular expressions must be treated carefully, since normal quoting
|
||||
characters lose their meanings between brackets. If the pattern is
|
||||
stored in a shell variable, quoting the variable expansion forces
|
||||
the entire pattern to be matched as a string. Substrings matched
|
||||
by parenthesized subexpressions within the regular expression are
|
||||
saved in the array variable 'BASH_REMATCH'. The element of
|
||||
'BASH_REMATCH' with index 0 is the portion of the string matching
|
||||
the entire regular expression. The element of 'BASH_REMATCH' with
|
||||
index N is the portion of the string matching the Nth parenthesized
|
||||
subexpression.
|
||||
right of the operator is considered a POSIX extended regular
|
||||
expression and matched accordingly (as in regex3)). The return
|
||||
value is 0 if the string matches the pattern, and 1 otherwise. If
|
||||
the regular expression is syntactically incorrect, the conditional
|
||||
expression's return value is 2. If the 'nocasematch' shell option
|
||||
(see the description of 'shopt' in *note The Shopt Builtin::) is
|
||||
enabled, the match is performed without regard to the case of
|
||||
alphabetic characters. Any part of the pattern may be quoted to
|
||||
force the quoted portion to be matched as a string. Bracket
|
||||
expressions in regular expressions must be treated carefully, since
|
||||
normal quoting characters lose their meanings between brackets. If
|
||||
the pattern is stored in a shell variable, quoting the variable
|
||||
expansion forces the entire pattern to be matched as a string.
|
||||
Substrings matched by parenthesized subexpressions within the
|
||||
regular expression are saved in the array variable 'BASH_REMATCH'.
|
||||
The element of 'BASH_REMATCH' with index 0 is the portion of the
|
||||
string matching the entire regular expression. The element of
|
||||
'BASH_REMATCH' with index N is the portion of the string matching
|
||||
the Nth parenthesized subexpression.
|
||||
|
||||
For example, the following will match a line (stored in the shell
|
||||
variable LINE) if there is a sequence of characters in the value
|
||||
@@ -1670,18 +1670,17 @@ parameter with more than one digit, or when PARAMETER is followed by a
|
||||
character that is not to be interpreted as part of its name.
|
||||
|
||||
If the first character of PARAMETER is an exclamation point (!), and
|
||||
PARAMETER is not a NAMEREF, it introduces a level of variable
|
||||
indirection. Bash uses the value of the variable formed from the rest
|
||||
of PARAMETER as the name of the variable; this variable is then expanded
|
||||
and that value is used in the rest of the substitution, rather than the
|
||||
value of PARAMETER itself. This is known as 'indirect expansion'. The
|
||||
value is subject to tilde expansion, parameter expansion, command
|
||||
substitution, and arithmetic expansion. If PARAMETER is a nameref, this
|
||||
expands to the name of the variable referenced by PARAMETER instead of
|
||||
performing the complete indirect expansion. The exceptions to this are
|
||||
the expansions of ${!PREFIX*} and ${!NAME[@]} described below. The
|
||||
exclamation point must immediately follow the left brace in order to
|
||||
introduce indirection.
|
||||
PARAMETER is not a NAMEREF, it introduces a level of indirection. Bash
|
||||
uses the value formed by expanding the rest of PARAMETER as the new
|
||||
PARAMETER; this is then expanded and that value is used in the rest of
|
||||
the expansion, rather than the expansion of the original PARAMETER.
|
||||
This is known as 'indirect expansion'. The value is subject to tilde
|
||||
expansion, parameter expansion, command substitution, and arithmetic
|
||||
expansion. If PARAMETER is a nameref, this expands to the name of the
|
||||
variable referenced by PARAMETER instead of performing the complete
|
||||
indirect expansion. The exceptions to this are the expansions of
|
||||
${!PREFIX*} and ${!NAME[@]} described below. The exclamation point must
|
||||
immediately follow the left brace in order to introduce indirection.
|
||||
|
||||
In each of the cases below, WORD is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
@@ -4843,7 +4842,8 @@ Variables::).
|
||||
onto 'BASH_ARGC'. The shell sets 'BASH_ARGC' only when in extended
|
||||
debugging mode (see *note The Shopt Builtin:: for a description of
|
||||
the 'extdebug' option to the 'shopt' builtin). Setting 'extdebug'
|
||||
after the shell has started to execute a script may result in
|
||||
after the shell has started to execute a script, or referencing
|
||||
this variable when 'extdebug' is not set, may result in
|
||||
inconsistent values.
|
||||
|
||||
'BASH_ARGV'
|
||||
@@ -4855,7 +4855,8 @@ Variables::).
|
||||
sets 'BASH_ARGV' only when in extended debugging mode (see *note
|
||||
The Shopt Builtin:: for a description of the 'extdebug' option to
|
||||
the 'shopt' builtin). Setting 'extdebug' after the shell has
|
||||
started to execute a script may result in inconsistent values.
|
||||
started to execute a script, or referencing this variable when
|
||||
'extdebug' is not set, may result in inconsistent values.
|
||||
|
||||
'BASH_ARGV0'
|
||||
When referenced, this variable expands to the name of the shell or
|
||||
@@ -9294,7 +9295,8 @@ previous commands quickly.
|
||||
|
||||
History expansion is performed immediately after a complete line is
|
||||
read, before the shell breaks it into words, and is performed on each
|
||||
line individually without taking quoting on previous lines into account.
|
||||
line individually. Bash attempts to inform the history expansion
|
||||
functions about quoting still in effect from previous lines.
|
||||
|
||||
History expansion takes place in two parts. The first is to
|
||||
determine which line from the history list should be used during
|
||||
@@ -9305,10 +9307,20 @@ are called "words". Various "modifiers" are available to manipulate the
|
||||
selected words. The line is broken into words in the same fashion that
|
||||
Bash does, so that several words surrounded by quotes are considered one
|
||||
word. History expansions are introduced by the appearance of the
|
||||
history expansion character, which is '!' by default. Only '\' and '''
|
||||
may be used to escape the history expansion character, but the history
|
||||
expansion character is also treated as quoted if it immediately precedes
|
||||
the closing double quote in a double-quoted string.
|
||||
history expansion character, which is '!' by default.
|
||||
|
||||
History expansion implements shell-like quoting conventions: a
|
||||
backslash can be used to remove the special handling for the next
|
||||
character; single quotes enclose verbatim sequences of characters, and
|
||||
can be used to inhibit history expansion; and characters enclosed within
|
||||
double quotes may be subject to history expansion, since backslash can
|
||||
escape the history expansion character, but single quotes may not, since
|
||||
they are not treated specially within double quotes.
|
||||
|
||||
When using the shell, only '\' and ''' may be used to escape the
|
||||
history expansion character, but the history expansion character is also
|
||||
treated as quoted if it immediately precedes the closing double quote in
|
||||
a double-quoted string.
|
||||
|
||||
Several shell options settable with the 'shopt' builtin (*note The
|
||||
Shopt Builtin::) may be used to tailor the behavior of history
|
||||
@@ -11062,21 +11074,21 @@ D.3 Parameter and Variable Index
|
||||
* BASHPID: Bash Variables. (line 25)
|
||||
* BASH_ALIASES: Bash Variables. (line 32)
|
||||
* BASH_ARGC: Bash Variables. (line 41)
|
||||
* BASH_ARGV: Bash Variables. (line 53)
|
||||
* BASH_ARGV0: Bash Variables. (line 64)
|
||||
* BASH_CMDS: Bash Variables. (line 72)
|
||||
* BASH_COMMAND: Bash Variables. (line 81)
|
||||
* BASH_COMPAT: Bash Variables. (line 86)
|
||||
* BASH_ENV: Bash Variables. (line 101)
|
||||
* BASH_EXECUTION_STRING: Bash Variables. (line 107)
|
||||
* BASH_LINENO: Bash Variables. (line 110)
|
||||
* BASH_LOADABLES_PATH: Bash Variables. (line 118)
|
||||
* BASH_REMATCH: Bash Variables. (line 122)
|
||||
* BASH_SOURCE: Bash Variables. (line 130)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 137)
|
||||
* BASH_VERSINFO: Bash Variables. (line 142)
|
||||
* BASH_VERSION: Bash Variables. (line 165)
|
||||
* BASH_XTRACEFD: Bash Variables. (line 168)
|
||||
* BASH_ARGV: Bash Variables. (line 54)
|
||||
* BASH_ARGV0: Bash Variables. (line 66)
|
||||
* BASH_CMDS: Bash Variables. (line 74)
|
||||
* BASH_COMMAND: Bash Variables. (line 83)
|
||||
* BASH_COMPAT: Bash Variables. (line 88)
|
||||
* BASH_ENV: Bash Variables. (line 103)
|
||||
* BASH_EXECUTION_STRING: Bash Variables. (line 109)
|
||||
* BASH_LINENO: Bash Variables. (line 112)
|
||||
* BASH_LOADABLES_PATH: Bash Variables. (line 120)
|
||||
* BASH_REMATCH: Bash Variables. (line 124)
|
||||
* BASH_SOURCE: Bash Variables. (line 132)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 139)
|
||||
* BASH_VERSINFO: Bash Variables. (line 144)
|
||||
* BASH_VERSION: Bash Variables. (line 167)
|
||||
* BASH_XTRACEFD: Bash Variables. (line 170)
|
||||
* bell-style: Readline Init File Syntax.
|
||||
(line 38)
|
||||
* bind-tty-special-chars: Readline Init File Syntax.
|
||||
@@ -11085,12 +11097,12 @@ D.3 Parameter and Variable Index
|
||||
(line 50)
|
||||
* CDPATH: Bourne Shell Variables.
|
||||
(line 9)
|
||||
* CHILD_MAX: Bash Variables. (line 179)
|
||||
* CHILD_MAX: Bash Variables. (line 181)
|
||||
* colored-completion-prefix: Readline Init File Syntax.
|
||||
(line 55)
|
||||
* colored-stats: Readline Init File Syntax.
|
||||
(line 62)
|
||||
* COLUMNS: Bash Variables. (line 186)
|
||||
* COLUMNS: Bash Variables. (line 188)
|
||||
* comment-begin: Readline Init File Syntax.
|
||||
(line 68)
|
||||
* completion-display-width: Readline Init File Syntax.
|
||||
@@ -11103,90 +11115,90 @@ D.3 Parameter and Variable Index
|
||||
(line 91)
|
||||
* completion-query-items: Readline Init File Syntax.
|
||||
(line 98)
|
||||
* COMPREPLY: Bash Variables. (line 238)
|
||||
* COMP_CWORD: Bash Variables. (line 192)
|
||||
* COMP_KEY: Bash Variables. (line 221)
|
||||
* COMP_LINE: Bash Variables. (line 198)
|
||||
* COMP_POINT: Bash Variables. (line 203)
|
||||
* COMP_TYPE: Bash Variables. (line 211)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 225)
|
||||
* COMP_WORDS: Bash Variables. (line 231)
|
||||
* COMPREPLY: Bash Variables. (line 240)
|
||||
* COMP_CWORD: Bash Variables. (line 194)
|
||||
* COMP_KEY: Bash Variables. (line 223)
|
||||
* COMP_LINE: Bash Variables. (line 200)
|
||||
* COMP_POINT: Bash Variables. (line 205)
|
||||
* COMP_TYPE: Bash Variables. (line 213)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 227)
|
||||
* COMP_WORDS: Bash Variables. (line 233)
|
||||
* convert-meta: Readline Init File Syntax.
|
||||
(line 108)
|
||||
* COPROC: Bash Variables. (line 244)
|
||||
* DIRSTACK: Bash Variables. (line 248)
|
||||
* COPROC: Bash Variables. (line 246)
|
||||
* DIRSTACK: Bash Variables. (line 250)
|
||||
* disable-completion: Readline Init File Syntax.
|
||||
(line 116)
|
||||
* echo-control-characters: Readline Init File Syntax.
|
||||
(line 121)
|
||||
* editing-mode: Readline Init File Syntax.
|
||||
(line 126)
|
||||
* EMACS: Bash Variables. (line 258)
|
||||
* EMACS: Bash Variables. (line 260)
|
||||
* emacs-mode-string: Readline Init File Syntax.
|
||||
(line 132)
|
||||
* enable-bracketed-paste: Readline Init File Syntax.
|
||||
(line 142)
|
||||
* enable-keypad: Readline Init File Syntax.
|
||||
(line 150)
|
||||
* ENV: Bash Variables. (line 263)
|
||||
* EPOCHREALTIME: Bash Variables. (line 267)
|
||||
* EPOCHSECONDS: Bash Variables. (line 275)
|
||||
* EUID: Bash Variables. (line 282)
|
||||
* EXECIGNORE: Bash Variables. (line 286)
|
||||
* ENV: Bash Variables. (line 265)
|
||||
* EPOCHREALTIME: Bash Variables. (line 269)
|
||||
* EPOCHSECONDS: Bash Variables. (line 277)
|
||||
* EUID: Bash Variables. (line 284)
|
||||
* EXECIGNORE: Bash Variables. (line 288)
|
||||
* expand-tilde: Readline Init File Syntax.
|
||||
(line 161)
|
||||
* FCEDIT: Bash Variables. (line 299)
|
||||
* FIGNORE: Bash Variables. (line 303)
|
||||
* FUNCNAME: Bash Variables. (line 309)
|
||||
* FUNCNEST: Bash Variables. (line 326)
|
||||
* GLOBIGNORE: Bash Variables. (line 331)
|
||||
* GROUPS: Bash Variables. (line 338)
|
||||
* histchars: Bash Variables. (line 344)
|
||||
* HISTCMD: Bash Variables. (line 359)
|
||||
* HISTCONTROL: Bash Variables. (line 364)
|
||||
* HISTFILE: Bash Variables. (line 380)
|
||||
* HISTFILESIZE: Bash Variables. (line 384)
|
||||
* HISTIGNORE: Bash Variables. (line 395)
|
||||
* FCEDIT: Bash Variables. (line 301)
|
||||
* FIGNORE: Bash Variables. (line 305)
|
||||
* FUNCNAME: Bash Variables. (line 311)
|
||||
* FUNCNEST: Bash Variables. (line 328)
|
||||
* GLOBIGNORE: Bash Variables. (line 333)
|
||||
* GROUPS: Bash Variables. (line 340)
|
||||
* histchars: Bash Variables. (line 346)
|
||||
* HISTCMD: Bash Variables. (line 361)
|
||||
* HISTCONTROL: Bash Variables. (line 366)
|
||||
* HISTFILE: Bash Variables. (line 382)
|
||||
* HISTFILESIZE: Bash Variables. (line 386)
|
||||
* HISTIGNORE: Bash Variables. (line 397)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 165)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 171)
|
||||
* HISTSIZE: Bash Variables. (line 415)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 422)
|
||||
* HISTSIZE: Bash Variables. (line 417)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 424)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 180)
|
||||
* HOSTFILE: Bash Variables. (line 430)
|
||||
* HOSTNAME: Bash Variables. (line 441)
|
||||
* HOSTTYPE: Bash Variables. (line 444)
|
||||
* HOSTFILE: Bash Variables. (line 432)
|
||||
* HOSTNAME: Bash Variables. (line 443)
|
||||
* HOSTTYPE: Bash Variables. (line 446)
|
||||
* IFS: Bourne Shell Variables.
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 447)
|
||||
* IGNOREEOF: Bash Variables. (line 449)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 187)
|
||||
* INPUTRC: Bash Variables. (line 457)
|
||||
* INPUTRC: Bash Variables. (line 459)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 195)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 202)
|
||||
* LANG: Bash Variables. (line 461)
|
||||
* LC_ALL: Bash Variables. (line 465)
|
||||
* LC_COLLATE: Bash Variables. (line 469)
|
||||
* LC_CTYPE: Bash Variables. (line 476)
|
||||
* LANG: Bash Variables. (line 463)
|
||||
* LC_ALL: Bash Variables. (line 467)
|
||||
* LC_COLLATE: Bash Variables. (line 471)
|
||||
* LC_CTYPE: Bash Variables. (line 478)
|
||||
* LC_MESSAGES: Locale Translation. (line 11)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 481)
|
||||
* LC_NUMERIC: Bash Variables. (line 485)
|
||||
* LC_TIME: Bash Variables. (line 489)
|
||||
* LINENO: Bash Variables. (line 493)
|
||||
* LINES: Bash Variables. (line 497)
|
||||
* MACHTYPE: Bash Variables. (line 503)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 483)
|
||||
* LC_NUMERIC: Bash Variables. (line 487)
|
||||
* LC_TIME: Bash Variables. (line 491)
|
||||
* LINENO: Bash Variables. (line 495)
|
||||
* LINES: Bash Variables. (line 499)
|
||||
* MACHTYPE: Bash Variables. (line 505)
|
||||
* MAIL: Bourne Shell Variables.
|
||||
(line 22)
|
||||
* MAILCHECK: Bash Variables. (line 507)
|
||||
* MAILCHECK: Bash Variables. (line 509)
|
||||
* MAILPATH: Bourne Shell Variables.
|
||||
(line 27)
|
||||
* MAPFILE: Bash Variables. (line 515)
|
||||
* MAPFILE: Bash Variables. (line 517)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 232)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
@@ -11197,42 +11209,42 @@ D.3 Parameter and Variable Index
|
||||
(line 249)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 187)
|
||||
* OLDPWD: Bash Variables. (line 519)
|
||||
* OLDPWD: Bash Variables. (line 521)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 34)
|
||||
* OPTERR: Bash Variables. (line 522)
|
||||
* OPTERR: Bash Variables. (line 524)
|
||||
* OPTIND: Bourne Shell Variables.
|
||||
(line 38)
|
||||
* OSTYPE: Bash Variables. (line 526)
|
||||
* OSTYPE: Bash Variables. (line 528)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 254)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 260)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 42)
|
||||
* PIPESTATUS: Bash Variables. (line 529)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 534)
|
||||
* PPID: Bash Variables. (line 543)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 547)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 551)
|
||||
* PS0: Bash Variables. (line 557)
|
||||
* PIPESTATUS: Bash Variables. (line 531)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 536)
|
||||
* PPID: Bash Variables. (line 545)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 549)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 553)
|
||||
* PS0: Bash Variables. (line 559)
|
||||
* PS1: Bourne Shell Variables.
|
||||
(line 48)
|
||||
* PS2: Bourne Shell Variables.
|
||||
(line 53)
|
||||
* PS3: Bash Variables. (line 562)
|
||||
* PS4: Bash Variables. (line 567)
|
||||
* PWD: Bash Variables. (line 575)
|
||||
* RANDOM: Bash Variables. (line 578)
|
||||
* READLINE_LINE: Bash Variables. (line 583)
|
||||
* READLINE_POINT: Bash Variables. (line 587)
|
||||
* REPLY: Bash Variables. (line 591)
|
||||
* PS3: Bash Variables. (line 564)
|
||||
* PS4: Bash Variables. (line 569)
|
||||
* PWD: Bash Variables. (line 577)
|
||||
* RANDOM: Bash Variables. (line 580)
|
||||
* READLINE_LINE: Bash Variables. (line 585)
|
||||
* READLINE_POINT: Bash Variables. (line 589)
|
||||
* REPLY: Bash Variables. (line 593)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 270)
|
||||
* SECONDS: Bash Variables. (line 594)
|
||||
* SHELL: Bash Variables. (line 600)
|
||||
* SHELLOPTS: Bash Variables. (line 605)
|
||||
* SHLVL: Bash Variables. (line 614)
|
||||
* SECONDS: Bash Variables. (line 596)
|
||||
* SHELL: Bash Variables. (line 602)
|
||||
* SHELLOPTS: Bash Variables. (line 607)
|
||||
* SHLVL: Bash Variables. (line 616)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 276)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
@@ -11243,10 +11255,10 @@ D.3 Parameter and Variable Index
|
||||
(line 297)
|
||||
* TEXTDOMAIN: Locale Translation. (line 11)
|
||||
* TEXTDOMAINDIR: Locale Translation. (line 11)
|
||||
* TIMEFORMAT: Bash Variables. (line 619)
|
||||
* TMOUT: Bash Variables. (line 657)
|
||||
* TMPDIR: Bash Variables. (line 669)
|
||||
* UID: Bash Variables. (line 673)
|
||||
* TIMEFORMAT: Bash Variables. (line 621)
|
||||
* TMOUT: Bash Variables. (line 659)
|
||||
* TMPDIR: Bash Variables. (line 671)
|
||||
* UID: Bash Variables. (line 675)
|
||||
* vi-cmd-mode-string: Readline Init File Syntax.
|
||||
(line 310)
|
||||
* vi-ins-mode-string: Readline Init File Syntax.
|
||||
@@ -11637,112 +11649,112 @@ Node: Lists23773
|
||||
Node: Compound Commands25512
|
||||
Node: Looping Constructs26524
|
||||
Node: Conditional Constructs29019
|
||||
Node: Command Grouping40099
|
||||
Node: Coprocesses41578
|
||||
Node: GNU Parallel43481
|
||||
Node: Shell Functions47539
|
||||
Node: Shell Parameters54622
|
||||
Node: Positional Parameters59035
|
||||
Node: Special Parameters59935
|
||||
Node: Shell Expansions63649
|
||||
Node: Brace Expansion65772
|
||||
Node: Tilde Expansion68496
|
||||
Node: Shell Parameter Expansion70844
|
||||
Node: Command Substitution85327
|
||||
Node: Arithmetic Expansion86682
|
||||
Node: Process Substitution87614
|
||||
Node: Word Splitting88734
|
||||
Node: Filename Expansion90678
|
||||
Node: Pattern Matching93208
|
||||
Node: Quote Removal97194
|
||||
Node: Redirections97489
|
||||
Node: Executing Commands107047
|
||||
Node: Simple Command Expansion107717
|
||||
Node: Command Search and Execution109647
|
||||
Node: Command Execution Environment112023
|
||||
Node: Environment115007
|
||||
Node: Exit Status116666
|
||||
Node: Signals118336
|
||||
Node: Shell Scripts120303
|
||||
Node: Shell Builtin Commands122818
|
||||
Node: Bourne Shell Builtins124856
|
||||
Node: Bash Builtins145514
|
||||
Node: Modifying Shell Behavior174422
|
||||
Node: The Set Builtin174767
|
||||
Node: The Shopt Builtin185180
|
||||
Node: Special Builtins202050
|
||||
Node: Shell Variables203029
|
||||
Node: Bourne Shell Variables203466
|
||||
Node: Bash Variables205570
|
||||
Node: Bash Features235584
|
||||
Node: Invoking Bash236483
|
||||
Node: Bash Startup Files242496
|
||||
Node: Interactive Shells247599
|
||||
Node: What is an Interactive Shell?248009
|
||||
Node: Is this Shell Interactive?248658
|
||||
Node: Interactive Shell Behavior249473
|
||||
Node: Bash Conditional Expressions252960
|
||||
Node: Shell Arithmetic257326
|
||||
Node: Aliases260143
|
||||
Node: Arrays262691
|
||||
Node: The Directory Stack268057
|
||||
Node: Directory Stack Builtins268841
|
||||
Node: Controlling the Prompt271809
|
||||
Node: The Restricted Shell274575
|
||||
Node: Bash POSIX Mode276400
|
||||
Node: Job Control286751
|
||||
Node: Job Control Basics287211
|
||||
Node: Job Control Builtins292179
|
||||
Node: Job Control Variables296906
|
||||
Node: Command Line Editing298062
|
||||
Node: Introduction and Notation299733
|
||||
Node: Readline Interaction301356
|
||||
Node: Readline Bare Essentials302547
|
||||
Node: Readline Movement Commands304330
|
||||
Node: Readline Killing Commands305290
|
||||
Node: Readline Arguments307208
|
||||
Node: Searching308252
|
||||
Node: Readline Init File310438
|
||||
Node: Readline Init File Syntax311585
|
||||
Node: Conditional Init Constructs331985
|
||||
Node: Sample Init File336181
|
||||
Node: Bindable Readline Commands339298
|
||||
Node: Commands For Moving340502
|
||||
Node: Commands For History342351
|
||||
Node: Commands For Text346646
|
||||
Node: Commands For Killing350034
|
||||
Node: Numeric Arguments352515
|
||||
Node: Commands For Completion353654
|
||||
Node: Keyboard Macros357845
|
||||
Node: Miscellaneous Commands358532
|
||||
Node: Readline vi Mode364485
|
||||
Node: Programmable Completion365392
|
||||
Node: Programmable Completion Builtins372986
|
||||
Node: A Programmable Completion Example383514
|
||||
Node: Using History Interactively388754
|
||||
Node: Bash History Facilities389438
|
||||
Node: Bash History Builtins392443
|
||||
Node: History Interaction396974
|
||||
Node: Event Designators400041
|
||||
Node: Word Designators401260
|
||||
Node: Modifiers402897
|
||||
Node: Installing Bash404299
|
||||
Node: Basic Installation405436
|
||||
Node: Compilers and Options408694
|
||||
Node: Compiling For Multiple Architectures409435
|
||||
Node: Installation Names411128
|
||||
Node: Specifying the System Type411946
|
||||
Node: Sharing Defaults412662
|
||||
Node: Operation Controls413335
|
||||
Node: Optional Features414293
|
||||
Node: Reporting Bugs424811
|
||||
Node: Major Differences From The Bourne Shell426005
|
||||
Node: GNU Free Documentation License442857
|
||||
Node: Indexes468034
|
||||
Node: Builtin Index468488
|
||||
Node: Reserved Word Index475315
|
||||
Node: Variable Index477763
|
||||
Node: Function Index493441
|
||||
Node: Concept Index506744
|
||||
Node: Command Grouping40102
|
||||
Node: Coprocesses41581
|
||||
Node: GNU Parallel43484
|
||||
Node: Shell Functions47542
|
||||
Node: Shell Parameters54625
|
||||
Node: Positional Parameters59038
|
||||
Node: Special Parameters59938
|
||||
Node: Shell Expansions63652
|
||||
Node: Brace Expansion65775
|
||||
Node: Tilde Expansion68499
|
||||
Node: Shell Parameter Expansion70847
|
||||
Node: Command Substitution85303
|
||||
Node: Arithmetic Expansion86658
|
||||
Node: Process Substitution87590
|
||||
Node: Word Splitting88710
|
||||
Node: Filename Expansion90654
|
||||
Node: Pattern Matching93184
|
||||
Node: Quote Removal97170
|
||||
Node: Redirections97465
|
||||
Node: Executing Commands107023
|
||||
Node: Simple Command Expansion107693
|
||||
Node: Command Search and Execution109623
|
||||
Node: Command Execution Environment111999
|
||||
Node: Environment114983
|
||||
Node: Exit Status116642
|
||||
Node: Signals118312
|
||||
Node: Shell Scripts120279
|
||||
Node: Shell Builtin Commands122794
|
||||
Node: Bourne Shell Builtins124832
|
||||
Node: Bash Builtins145490
|
||||
Node: Modifying Shell Behavior174398
|
||||
Node: The Set Builtin174743
|
||||
Node: The Shopt Builtin185156
|
||||
Node: Special Builtins202026
|
||||
Node: Shell Variables203005
|
||||
Node: Bourne Shell Variables203442
|
||||
Node: Bash Variables205546
|
||||
Node: Bash Features235686
|
||||
Node: Invoking Bash236585
|
||||
Node: Bash Startup Files242598
|
||||
Node: Interactive Shells247701
|
||||
Node: What is an Interactive Shell?248111
|
||||
Node: Is this Shell Interactive?248760
|
||||
Node: Interactive Shell Behavior249575
|
||||
Node: Bash Conditional Expressions253062
|
||||
Node: Shell Arithmetic257428
|
||||
Node: Aliases260245
|
||||
Node: Arrays262793
|
||||
Node: The Directory Stack268159
|
||||
Node: Directory Stack Builtins268943
|
||||
Node: Controlling the Prompt271911
|
||||
Node: The Restricted Shell274677
|
||||
Node: Bash POSIX Mode276502
|
||||
Node: Job Control286853
|
||||
Node: Job Control Basics287313
|
||||
Node: Job Control Builtins292281
|
||||
Node: Job Control Variables297008
|
||||
Node: Command Line Editing298164
|
||||
Node: Introduction and Notation299835
|
||||
Node: Readline Interaction301458
|
||||
Node: Readline Bare Essentials302649
|
||||
Node: Readline Movement Commands304432
|
||||
Node: Readline Killing Commands305392
|
||||
Node: Readline Arguments307310
|
||||
Node: Searching308354
|
||||
Node: Readline Init File310540
|
||||
Node: Readline Init File Syntax311687
|
||||
Node: Conditional Init Constructs332087
|
||||
Node: Sample Init File336283
|
||||
Node: Bindable Readline Commands339400
|
||||
Node: Commands For Moving340604
|
||||
Node: Commands For History342453
|
||||
Node: Commands For Text346748
|
||||
Node: Commands For Killing350136
|
||||
Node: Numeric Arguments352617
|
||||
Node: Commands For Completion353756
|
||||
Node: Keyboard Macros357947
|
||||
Node: Miscellaneous Commands358634
|
||||
Node: Readline vi Mode364587
|
||||
Node: Programmable Completion365494
|
||||
Node: Programmable Completion Builtins373088
|
||||
Node: A Programmable Completion Example383616
|
||||
Node: Using History Interactively388856
|
||||
Node: Bash History Facilities389540
|
||||
Node: Bash History Builtins392545
|
||||
Node: History Interaction397076
|
||||
Node: Event Designators400696
|
||||
Node: Word Designators401915
|
||||
Node: Modifiers403552
|
||||
Node: Installing Bash404954
|
||||
Node: Basic Installation406091
|
||||
Node: Compilers and Options409349
|
||||
Node: Compiling For Multiple Architectures410090
|
||||
Node: Installation Names411783
|
||||
Node: Specifying the System Type412601
|
||||
Node: Sharing Defaults413317
|
||||
Node: Operation Controls413990
|
||||
Node: Optional Features414948
|
||||
Node: Reporting Bugs425466
|
||||
Node: Major Differences From The Bourne Shell426660
|
||||
Node: GNU Free Documentation License443512
|
||||
Node: Indexes468689
|
||||
Node: Builtin Index469143
|
||||
Node: Reserved Word Index475970
|
||||
Node: Variable Index478418
|
||||
Node: Function Index494096
|
||||
Node: Concept Index507399
|
||||
|
||||
End Tag Table
|
||||
|
||||
+31
-31
@@ -1,4 +1,4 @@
|
||||
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_2) (preloaded format=pdfetex 2017.7.5) 8 JUN 2018 16:17
|
||||
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_2) (preloaded format=pdfetex 2017.7.5) 16 JUL 2018 10:36
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
file:line:error style messages enabled.
|
||||
@@ -261,43 +261,43 @@ texinfo.tex: doing @include of hsuser.texi
|
||||
|
||||
|
||||
(/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9 [139]
|
||||
[140] [141] [142] [143]) Chapter 10 [144] [145] [146] [147] [148] [149]
|
||||
[150] [151] Appendix A [152] Appendix B [153] [154] [155] [156] [157] [158]
|
||||
Appendix C [159]
|
||||
[140] [141] [142] [143] [144]) Chapter 10 [145] [146] [147] [148] [149]
|
||||
[150] [151] [152] Appendix A [153] Appendix B [154] [155] [156] [157] [158]
|
||||
[159] Appendix C [160]
|
||||
texinfo.tex: doing @include of fdl.texi
|
||||
|
||||
(/Users/chet/src/bash/src/doc/fdl.texi [160] [161] [162]
|
||||
[163] [164] [165] [166]) Appendix D [167] [168] [169] [170] [171] [172]
|
||||
[173] [174] [175] [176] )
|
||||
(/Users/chet/src/bash/src/doc/fdl.texi [161] [162]
|
||||
[163] [164] [165] [166] [167]) Appendix D [168] [169] [170] [171] [172]
|
||||
[173] [174] [175] [176] [177] )
|
||||
Here is how much of TeX's memory you used:
|
||||
4064 strings out of 497104
|
||||
47069 string characters out of 6206767
|
||||
136590 words of memory out of 5000000
|
||||
4065 strings out of 497104
|
||||
47072 string characters out of 6206767
|
||||
136573 words of memory out of 5000000
|
||||
4846 multiletter control sequences out of 15000+600000
|
||||
34315 words of font info for 116 fonts, out of 8000000 for 9000
|
||||
51 hyphenation exceptions out of 8191
|
||||
16i,6n,16p,326b,968s stack positions out of 5000i,500n,10000p,200000b,80000s
|
||||
{/opt/local/share/texmf-texlive/fonts/enc/dvips/cm-sup
|
||||
er/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/
|
||||
cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cm
|
||||
csc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10
|
||||
.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi12.pfb>
|
||||
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi9.pfb></opt/
|
||||
local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb></opt/local/
|
||||
share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/local/share/t
|
||||
exmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/local/share/texmf-
|
||||
texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/local/share/texmf-tex
|
||||
live/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/share/texmf-texlive/
|
||||
fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-texlive/fonts
|
||||
/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-texlive/fonts/type
|
||||
1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
|
||||
lic/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
|
||||
-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm-super
|
||||
/sfrm1440.pfb>
|
||||
Output written on bashref.pdf (182 pages, 748408 bytes).
|
||||
{/opt/local/share/texmf-texlive/fonts/enc/dvips/
|
||||
cm-super/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type1/public/ams
|
||||
fonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts
|
||||
/cm/cmcsc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/
|
||||
cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi1
|
||||
2.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi9.pfb>
|
||||
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb></opt/
|
||||
local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/local/s
|
||||
hare/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/local/share/
|
||||
texmf-texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/local/share/tex
|
||||
mf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/share/texmf-te
|
||||
xlive/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-texlive
|
||||
/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-texlive/font
|
||||
s/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fonts/typ
|
||||
e1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
|
||||
lic/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
|
||||
-super/sfrm1440.pfb>
|
||||
Output written on bashref.pdf (183 pages, 750313 bytes).
|
||||
PDF statistics:
|
||||
2615 PDF objects out of 2984 (max. 8388607)
|
||||
2388 compressed objects within 24 object streams
|
||||
308 named destinations out of 1000 (max. 500000)
|
||||
2618 PDF objects out of 2984 (max. 8388607)
|
||||
2390 compressed objects within 24 object streams
|
||||
309 named destinations out of 1000 (max. 500000)
|
||||
1125 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||
|
||||
|
||||
Binary file not shown.
+1039
-982
File diff suppressed because it is too large
Load Diff
@@ -6095,6 +6095,11 @@ input to the shell. This is only in effect for interactive shells.
|
||||
The name of the Readline initialization file, overriding the default
|
||||
of @file{~/.inputrc}.
|
||||
|
||||
@item INSIDE_EMACS
|
||||
If Bash finds this variable in the environment when the shell
|
||||
starts, it assumes that the shell is running in an Emacs shell buffer
|
||||
and may disable line editing depending on the value of @env{TERM}.
|
||||
|
||||
@item LANG
|
||||
Used to determine the locale category for any category not specifically
|
||||
selected with a variable starting with @code{LC_}.
|
||||
|
||||
+19
-19
@@ -118,22 +118,22 @@
|
||||
@numsubsecentry{Event Designators}{9.3.1}{Event Designators}{143}
|
||||
@numsubsecentry{Word Designators}{9.3.2}{Word Designators}{143}
|
||||
@numsubsecentry{Modifiers}{9.3.3}{Modifiers}{144}
|
||||
@numchapentry{Installing Bash}{10}{Installing Bash}{145}
|
||||
@numsecentry{Basic Installation}{10.1}{Basic Installation}{145}
|
||||
@numsecentry{Compilers and Options}{10.2}{Compilers and Options}{146}
|
||||
@numsecentry{Compiling For Multiple Architectures}{10.3}{Compiling For Multiple Architectures}{146}
|
||||
@numsecentry{Installation Names}{10.4}{Installation Names}{146}
|
||||
@numsecentry{Specifying the System Type}{10.5}{Specifying the System Type}{147}
|
||||
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{147}
|
||||
@numsecentry{Operation Controls}{10.7}{Operation Controls}{147}
|
||||
@numsecentry{Optional Features}{10.8}{Optional Features}{148}
|
||||
@appentry{Reporting Bugs}{A}{Reporting Bugs}{153}
|
||||
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{154}
|
||||
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{158}
|
||||
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{160}
|
||||
@appentry{Indexes}{D}{Indexes}{168}
|
||||
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{168}
|
||||
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{169}
|
||||
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{170}
|
||||
@appsecentry{Function Index}{D.4}{Function Index}{172}
|
||||
@appsecentry{Concept Index}{D.5}{Concept Index}{174}
|
||||
@numchapentry{Installing Bash}{10}{Installing Bash}{146}
|
||||
@numsecentry{Basic Installation}{10.1}{Basic Installation}{146}
|
||||
@numsecentry{Compilers and Options}{10.2}{Compilers and Options}{147}
|
||||
@numsecentry{Compiling For Multiple Architectures}{10.3}{Compiling For Multiple Architectures}{147}
|
||||
@numsecentry{Installation Names}{10.4}{Installation Names}{147}
|
||||
@numsecentry{Specifying the System Type}{10.5}{Specifying the System Type}{148}
|
||||
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{148}
|
||||
@numsecentry{Operation Controls}{10.7}{Operation Controls}{148}
|
||||
@numsecentry{Optional Features}{10.8}{Optional Features}{149}
|
||||
@appentry{Reporting Bugs}{A}{Reporting Bugs}{154}
|
||||
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{155}
|
||||
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{159}
|
||||
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{161}
|
||||
@appentry{Indexes}{D}{Indexes}{169}
|
||||
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{169}
|
||||
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{170}
|
||||
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{171}
|
||||
@appsecentry{Function Index}{D.4}{Function Index}{173}
|
||||
@appsecentry{Concept Index}{D.5}{Concept Index}{175}
|
||||
|
||||
+7
-7
@@ -36,7 +36,7 @@
|
||||
\entry{BASH_ARGC}{73}{\code {BASH_ARGC}}
|
||||
\entry{BASH_ARGV}{73}{\code {BASH_ARGV}}
|
||||
\entry{BASH_ARGV0}{73}{\code {BASH_ARGV0}}
|
||||
\entry{BASH_CMDS}{73}{\code {BASH_CMDS}}
|
||||
\entry{BASH_CMDS}{74}{\code {BASH_CMDS}}
|
||||
\entry{BASH_COMMAND}{74}{\code {BASH_COMMAND}}
|
||||
\entry{BASH_COMPAT}{74}{\code {BASH_COMPAT}}
|
||||
\entry{BASH_ENV}{74}{\code {BASH_ENV}}
|
||||
@@ -44,7 +44,7 @@
|
||||
\entry{BASH_LINENO}{74}{\code {BASH_LINENO}}
|
||||
\entry{BASH_LOADABLES_PATH}{74}{\code {BASH_LOADABLES_PATH}}
|
||||
\entry{BASH_REMATCH}{74}{\code {BASH_REMATCH}}
|
||||
\entry{BASH_SOURCE}{74}{\code {BASH_SOURCE}}
|
||||
\entry{BASH_SOURCE}{75}{\code {BASH_SOURCE}}
|
||||
\entry{BASH_SUBSHELL}{75}{\code {BASH_SUBSHELL}}
|
||||
\entry{BASH_VERSINFO}{75}{\code {BASH_VERSINFO}}
|
||||
\entry{BASH_VERSION}{75}{\code {BASH_VERSION}}
|
||||
@@ -60,7 +60,7 @@
|
||||
\entry{COMP_WORDS}{76}{\code {COMP_WORDS}}
|
||||
\entry{COMPREPLY}{76}{\code {COMPREPLY}}
|
||||
\entry{COPROC}{76}{\code {COPROC}}
|
||||
\entry{DIRSTACK}{76}{\code {DIRSTACK}}
|
||||
\entry{DIRSTACK}{77}{\code {DIRSTACK}}
|
||||
\entry{EMACS}{77}{\code {EMACS}}
|
||||
\entry{ENV}{77}{\code {ENV}}
|
||||
\entry{EPOCHREALTIME}{77}{\code {EPOCHREALTIME}}
|
||||
@@ -76,14 +76,14 @@
|
||||
\entry{histchars}{78}{\code {histchars}}
|
||||
\entry{HISTCMD}{78}{\code {HISTCMD}}
|
||||
\entry{HISTCONTROL}{78}{\code {HISTCONTROL}}
|
||||
\entry{HISTFILE}{78}{\code {HISTFILE}}
|
||||
\entry{HISTFILE}{79}{\code {HISTFILE}}
|
||||
\entry{HISTFILESIZE}{79}{\code {HISTFILESIZE}}
|
||||
\entry{HISTIGNORE}{79}{\code {HISTIGNORE}}
|
||||
\entry{HISTSIZE}{79}{\code {HISTSIZE}}
|
||||
\entry{HISTTIMEFORMAT}{79}{\code {HISTTIMEFORMAT}}
|
||||
\entry{HOSTFILE}{79}{\code {HOSTFILE}}
|
||||
\entry{HOSTNAME}{79}{\code {HOSTNAME}}
|
||||
\entry{HOSTTYPE}{79}{\code {HOSTTYPE}}
|
||||
\entry{HOSTTYPE}{80}{\code {HOSTTYPE}}
|
||||
\entry{IGNOREEOF}{80}{\code {IGNOREEOF}}
|
||||
\entry{INPUTRC}{80}{\code {INPUTRC}}
|
||||
\entry{LANG}{80}{\code {LANG}}
|
||||
@@ -97,7 +97,7 @@
|
||||
\entry{LINES}{80}{\code {LINES}}
|
||||
\entry{MACHTYPE}{80}{\code {MACHTYPE}}
|
||||
\entry{MAILCHECK}{80}{\code {MAILCHECK}}
|
||||
\entry{MAPFILE}{80}{\code {MAPFILE}}
|
||||
\entry{MAPFILE}{81}{\code {MAPFILE}}
|
||||
\entry{OLDPWD}{81}{\code {OLDPWD}}
|
||||
\entry{OPTERR}{81}{\code {OPTERR}}
|
||||
\entry{OSTYPE}{81}{\code {OSTYPE}}
|
||||
@@ -111,7 +111,7 @@
|
||||
\entry{PS4}{81}{\code {PS4}}
|
||||
\entry{PWD}{81}{\code {PWD}}
|
||||
\entry{RANDOM}{81}{\code {RANDOM}}
|
||||
\entry{READLINE_LINE}{81}{\code {READLINE_LINE}}
|
||||
\entry{READLINE_LINE}{82}{\code {READLINE_LINE}}
|
||||
\entry{READLINE_POINT}{82}{\code {READLINE_POINT}}
|
||||
\entry{REPLY}{82}{\code {REPLY}}
|
||||
\entry{SECONDS}{82}{\code {SECONDS}}
|
||||
|
||||
+7
-7
@@ -33,7 +33,7 @@
|
||||
\entry {\code {BASH_ARGC}}{73}
|
||||
\entry {\code {BASH_ARGV}}{73}
|
||||
\entry {\code {BASH_ARGV0}}{73}
|
||||
\entry {\code {BASH_CMDS}}{73}
|
||||
\entry {\code {BASH_CMDS}}{74}
|
||||
\entry {\code {BASH_COMMAND}}{74}
|
||||
\entry {\code {BASH_COMPAT}}{74}
|
||||
\entry {\code {BASH_ENV}}{74}
|
||||
@@ -41,7 +41,7 @@
|
||||
\entry {\code {BASH_LINENO}}{74}
|
||||
\entry {\code {BASH_LOADABLES_PATH}}{74}
|
||||
\entry {\code {BASH_REMATCH}}{74}
|
||||
\entry {\code {BASH_SOURCE}}{74}
|
||||
\entry {\code {BASH_SOURCE}}{75}
|
||||
\entry {\code {BASH_SUBSHELL}}{75}
|
||||
\entry {\code {BASH_VERSINFO}}{75}
|
||||
\entry {\code {BASH_VERSION}}{75}
|
||||
@@ -74,7 +74,7 @@
|
||||
\entry {\code {convert-meta}}{111}
|
||||
\entry {\code {COPROC}}{76}
|
||||
\initial {D}
|
||||
\entry {\code {DIRSTACK}}{76}
|
||||
\entry {\code {DIRSTACK}}{77}
|
||||
\entry {\code {disable-completion}}{111}
|
||||
\initial {E}
|
||||
\entry {\code {echo-control-characters}}{111}
|
||||
@@ -101,7 +101,7 @@
|
||||
\entry {\code {histchars}}{78}
|
||||
\entry {\code {HISTCMD}}{78}
|
||||
\entry {\code {HISTCONTROL}}{78}
|
||||
\entry {\code {HISTFILE}}{78}
|
||||
\entry {\code {HISTFILE}}{79}
|
||||
\entry {\code {HISTFILESIZE}}{79}
|
||||
\entry {\code {HISTIGNORE}}{79}
|
||||
\entry {\code {history-preserve-point}}{112}
|
||||
@@ -112,7 +112,7 @@
|
||||
\entry {\code {horizontal-scroll-mode}}{112}
|
||||
\entry {\code {HOSTFILE}}{79}
|
||||
\entry {\code {HOSTNAME}}{79}
|
||||
\entry {\code {HOSTTYPE}}{79}
|
||||
\entry {\code {HOSTTYPE}}{80}
|
||||
\initial {I}
|
||||
\entry {\code {IFS}}{72}
|
||||
\entry {\code {IGNOREEOF}}{80}
|
||||
@@ -136,7 +136,7 @@
|
||||
\entry {\code {MAIL}}{72}
|
||||
\entry {\code {MAILCHECK}}{80}
|
||||
\entry {\code {MAILPATH}}{72}
|
||||
\entry {\code {MAPFILE}}{80}
|
||||
\entry {\code {MAPFILE}}{81}
|
||||
\entry {\code {mark-modified-lines}}{113}
|
||||
\entry {\code {mark-symlinked-directories}}{113}
|
||||
\entry {\code {match-hidden-files}}{114}
|
||||
@@ -165,7 +165,7 @@
|
||||
\entry {\code {PWD}}{81}
|
||||
\initial {R}
|
||||
\entry {\code {RANDOM}}{81}
|
||||
\entry {\code {READLINE_LINE}}{81}
|
||||
\entry {\code {READLINE_LINE}}{82}
|
||||
\entry {\code {READLINE_POINT}}{82}
|
||||
\entry {\code {REPLY}}{82}
|
||||
\entry {\code {revert-all-at-newline}}{114}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.22.3
|
||||
%%CreationDate: Tue Jun 12 15:50:57 2018
|
||||
%%CreationDate: Mon Jul 16 10:36:39 2018
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.22.3
|
||||
%%CreationDate: Tue Jun 12 15:50:57 2018
|
||||
%%CreationDate: Mon Jul 16 10:36:39 2018
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%DocumentSuppliedResources: procset grops 1.22 3
|
||||
|
||||
@@ -214,6 +214,9 @@ int _rl_eof_char = CTRL ('D');
|
||||
/* Non-zero makes this the next keystroke to read. */
|
||||
int rl_pending_input = 0;
|
||||
|
||||
/* If non-zero when readline_internal returns, it means we found EOF */
|
||||
int _rl_eof_found = 0;
|
||||
|
||||
/* Pointer to a useful terminal name. */
|
||||
const char *rl_terminal_name = (const char *)NULL;
|
||||
|
||||
@@ -222,7 +225,7 @@ int _rl_horizontal_scroll_mode = 0;
|
||||
|
||||
/* Non-zero means to display an asterisk at the starts of history lines
|
||||
which have been modified. */
|
||||
int _rl_mark_modified_lines = 0;
|
||||
int _rl_mark_modified_lines = 0;
|
||||
|
||||
/* The style of `bell' notification preferred. This can be set to NO_BELL,
|
||||
AUDIBLE_BELL, or VISIBLE_BELL. */
|
||||
@@ -664,11 +667,9 @@ readline_internal_charloop (void)
|
||||
static char *
|
||||
readline_internal (void)
|
||||
{
|
||||
int eof;
|
||||
|
||||
readline_internal_setup ();
|
||||
eof = readline_internal_charloop ();
|
||||
return (readline_internal_teardown (eof));
|
||||
_rl_eof_found = readline_internal_charloop ();
|
||||
return (readline_internal_teardown (_rl_eof_found));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -511,6 +511,7 @@ extern FILE *_rl_in_stream;
|
||||
extern FILE *_rl_out_stream;
|
||||
extern int _rl_last_command_was_kill;
|
||||
extern int _rl_eof_char;
|
||||
extern int _rl_eof_found;
|
||||
extern procenv_t _rl_top_level;
|
||||
extern _rl_keyseq_cxt *_rl_kscxt;
|
||||
extern int _rl_keyseq_timeout;
|
||||
|
||||
@@ -691,7 +691,11 @@ rl_deprep_terminal (void)
|
||||
tty = rl_instream ? fileno (rl_instream) : fileno (stdin);
|
||||
|
||||
if (terminal_prepped & TPX_BRACKPASTE)
|
||||
fprintf (rl_outstream, BRACK_PASTE_FINI);
|
||||
{
|
||||
fprintf (rl_outstream, BRACK_PASTE_FINI);
|
||||
if (_rl_eof_found)
|
||||
fprintf (rl_outstream, "\n");
|
||||
}
|
||||
|
||||
if (_rl_enable_keypad)
|
||||
_rl_control_keypad (0);
|
||||
|
||||
@@ -387,10 +387,10 @@ dump_word_flags (flags)
|
||||
f &= ~W_ASSIGNARRAY;
|
||||
fprintf (stderr, "W_ASSIGNARRAY%s", f ? "|" : "");
|
||||
}
|
||||
if (f & W_HASCTLESC)
|
||||
if (f & W_SAWQUOTEDNULL)
|
||||
{
|
||||
f &= ~W_HASCTLESC;
|
||||
fprintf (stderr, "W_HASCTLESC%s", f ? "|" : "");
|
||||
f &= ~W_SAWQUOTEDNULL;
|
||||
fprintf (stderr, "W_SAWQUOTEDNULL%s", f ? "|" : "");
|
||||
}
|
||||
if (f & W_NOPROCSUB)
|
||||
{
|
||||
@@ -3062,6 +3062,7 @@ do_compound_assignment (name, value, flags)
|
||||
SHELL_VAR *v;
|
||||
int mklocal, mkassoc, mkglobal, chklocal;
|
||||
WORD_LIST *list;
|
||||
char *newname; /* used for local nameref references */
|
||||
|
||||
mklocal = flags & ASS_MKLOCAL;
|
||||
mkassoc = flags & ASS_MKASSOC;
|
||||
@@ -3071,6 +3072,7 @@ do_compound_assignment (name, value, flags)
|
||||
if (mklocal && variable_context)
|
||||
{
|
||||
v = find_variable (name);
|
||||
newname = (v == 0) ? nameref_transform_name (name, flags) : name;
|
||||
if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v)))
|
||||
{
|
||||
if (readonly_p (v))
|
||||
@@ -3079,9 +3081,9 @@ do_compound_assignment (name, value, flags)
|
||||
}
|
||||
list = expand_compound_array_assignment (v, value, flags);
|
||||
if (mkassoc)
|
||||
v = make_local_assoc_variable (name);
|
||||
v = make_local_assoc_variable (newname, 0);
|
||||
else if (v == 0 || (array_p (v) == 0 && assoc_p (v) == 0) || v->context != variable_context)
|
||||
v = make_local_array_variable (name, 0);
|
||||
v = make_local_array_variable (newname, 0);
|
||||
if (v)
|
||||
assign_compound_array_list (v, list, flags);
|
||||
if (list)
|
||||
@@ -3102,13 +3104,15 @@ do_compound_assignment (name, value, flags)
|
||||
err_readonly (name);
|
||||
return (v); /* XXX */
|
||||
}
|
||||
/* sanity check */
|
||||
newname = (v == 0) ? nameref_transform_name (name, flags) : name;
|
||||
list = expand_compound_array_assignment (v, value, flags);
|
||||
if (v == 0 && mkassoc)
|
||||
v = make_new_assoc_variable (name);
|
||||
v = make_new_assoc_variable (newname);
|
||||
else if (v && mkassoc && assoc_p (v) == 0)
|
||||
v = convert_var_to_assoc (v);
|
||||
else if (v == 0)
|
||||
v = make_new_array_variable (name);
|
||||
v = make_new_array_variable (newname);
|
||||
else if (v && mkassoc == 0 && array_p (v) == 0)
|
||||
v = convert_var_to_array (v);
|
||||
if (v)
|
||||
@@ -6009,10 +6013,7 @@ read_comsub (fd, quoted, flags, rflag)
|
||||
from the rest of the word expansions (word splitting and globbing.)
|
||||
This is essentially quote_escapes inline. */
|
||||
else if (skip_ctlesc == 0 && c == CTLESC)
|
||||
{
|
||||
tflag |= W_HASCTLESC;
|
||||
istring[istring_index++] = CTLESC;
|
||||
}
|
||||
istring[istring_index++] = CTLESC;
|
||||
else if ((skip_ctlnul == 0 && c == CTLNUL) || (c == ' ' && (ifs_value && *ifs_value == 0)))
|
||||
istring[istring_index++] = CTLESC;
|
||||
|
||||
@@ -6843,8 +6844,14 @@ parameter_brace_expand_rhs (name, value, op, quoted, pflags, qdollaratp, hasdoll
|
||||
temp = string_list_internal (l, " ");
|
||||
w->flags |= W_SPLITSPACE;
|
||||
}
|
||||
else if (l_hasdollat || l->next)
|
||||
temp = string_list_dollar_star (l, quoted, 0);
|
||||
else
|
||||
temp = (l_hasdollat || l->next) ? string_list_dollar_star (l, quoted, 0) : string_list (l);
|
||||
{
|
||||
temp = string_list (l);
|
||||
if (temp && (QUOTED_NULL (temp) == 0) && (l->word->flags & W_SAWQUOTEDNULL))
|
||||
w->flags |= W_SAWQUOTEDNULL; /* XXX */
|
||||
}
|
||||
|
||||
/* If we have a quoted null result (QUOTED_NULL(temp)) and the word is
|
||||
a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the
|
||||
@@ -9873,6 +9880,8 @@ add_string:
|
||||
|
||||
if (tword && (tword->flags & W_HASQUOTEDNULL))
|
||||
had_quoted_null = 1; /* note for later */
|
||||
if (tword && (tword->flags & W_SAWQUOTEDNULL))
|
||||
had_quoted_null = 1; /* XXX */
|
||||
|
||||
temp = tword ? tword->word : (char *)NULL;
|
||||
dispose_word_desc (tword);
|
||||
@@ -10149,6 +10158,9 @@ add_twochars:
|
||||
else
|
||||
temp = (char *)NULL;
|
||||
|
||||
if (temp == 0 && quoted_state == PARTIALLY_QUOTED)
|
||||
had_quoted_null = 1; /* note for later */
|
||||
|
||||
/* We do not want to add quoted nulls to strings that are only
|
||||
partially quoted; we can throw them away. The exception to
|
||||
this is when we are going to be performing word splitting,
|
||||
@@ -10419,6 +10431,8 @@ finished_with_string:
|
||||
tword->word = istring;
|
||||
if (had_quoted_null && QUOTED_NULL (istring))
|
||||
tword->flags |= W_HASQUOTEDNULL; /* XXX */
|
||||
else if (had_quoted_null)
|
||||
tword->flags |= W_SAWQUOTEDNULL; /* XXX */
|
||||
if (tword->word != istring)
|
||||
free (istring);
|
||||
istring = 0; /* avoid later free() */
|
||||
@@ -10657,10 +10671,24 @@ word_list_split (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
WORD_LIST *result, *t, *tresult, *e;
|
||||
WORD_DESC *w;
|
||||
|
||||
for (t = list, result = (WORD_LIST *)NULL; t; t = t->next)
|
||||
{
|
||||
tresult = word_split (t->word, ifs_value);
|
||||
/* POSIX 2.6: "If the complete expansion appropriate for a word results
|
||||
in an empty field, that empty field shall be deleted from the list
|
||||
of fields that form the completely expanded command, unless the
|
||||
original word contained single-quote or double-quote characters."
|
||||
This is where we handle these words that contain quoted null strings
|
||||
and other characters that expand to nothing after word splitting. */
|
||||
if (tresult == 0 && t->word && (t->word->flags & W_SAWQUOTEDNULL)) /* XXX */
|
||||
{
|
||||
w = alloc_word_desc ();
|
||||
w->word = (char *)xmalloc (1);
|
||||
w->word[0] = '\0';
|
||||
tresult = make_word_list (w, (WORD_LIST *)NULL);
|
||||
}
|
||||
if (result == 0)
|
||||
result = e = tresult;
|
||||
else
|
||||
|
||||
@@ -622,9 +622,8 @@ unary_test (op, arg)
|
||||
return (minus_o_option_value (arg) == 1);
|
||||
|
||||
case 'v':
|
||||
v = find_variable (arg);
|
||||
#if defined (ARRAY_VARS)
|
||||
if (v == 0 && valid_array_reference (arg, 0))
|
||||
if (valid_array_reference (arg, 0))
|
||||
{
|
||||
char *t;
|
||||
int rtype, ret;
|
||||
@@ -634,7 +633,8 @@ unary_test (op, arg)
|
||||
free (t);
|
||||
return ret;
|
||||
}
|
||||
else if (v && invisible_p (v) == 0 && array_p (v))
|
||||
v = find_variable (arg);
|
||||
if (v && invisible_p (v) == 0 && array_p (v))
|
||||
{
|
||||
char *t;
|
||||
/* [[ -v foo ]] == [[ -v foo[0] ]] */
|
||||
@@ -647,6 +647,8 @@ unary_test (op, arg)
|
||||
t = assoc_reference (assoc_cell (v), "0");
|
||||
return (t ? TRUE : FALSE);
|
||||
}
|
||||
#else
|
||||
v = find_variable (arg);
|
||||
#endif
|
||||
return (v && invisible_p (v) == 0 && var_isset (v) ? TRUE : FALSE);
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
@@ -220,3 +220,12 @@ declare -A a=(["80's"]="Depeche Mode" )
|
||||
1+5
|
||||
declare -A a=(["\$(date >&2)"]="5" )
|
||||
declare -A myarray=([foo]="bleh" ["foo[bar"]="bleh" )
|
||||
./assoc10.sub: line 1: declare: a: cannot convert indexed to associative array
|
||||
f: declare -a a
|
||||
./assoc10.sub: line 4: declare: a: cannot convert associative to indexed array
|
||||
f: declare -A a
|
||||
|
||||
f: declare -a a
|
||||
main: declare -- a="7"
|
||||
f: declare -A a
|
||||
main: declare -- a="42"
|
||||
|
||||
@@ -217,3 +217,5 @@ ${THIS_SH} ./assoc8.sub
|
||||
|
||||
# new shopt option to prevent multiple expansion of assoc array subscripts
|
||||
${THIS_SH} ./assoc9.sub
|
||||
|
||||
${THIS_SH} ./assoc10.sub
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
f() { declare -a a; declare -A a; echo -n "$FUNCNAME: " ; declare -p a; }
|
||||
f
|
||||
|
||||
f() { declare -A a; declare -a a; echo -n "$FUNCNAME: " ; declare -p a; }
|
||||
f
|
||||
|
||||
echo
|
||||
|
||||
f() { declare -a a; echo -n "$FUNCNAME: " ; declare -p a; }
|
||||
a=7
|
||||
f
|
||||
echo -n 'main: '; declare -p a
|
||||
|
||||
f() { declare -A a; echo -n "$FUNCNAME: " ; declare -p a; }
|
||||
a=42
|
||||
f
|
||||
echo -n 'main: '; declare -p a
|
||||
@@ -440,3 +440,24 @@ declare -n foo="bar"
|
||||
declare -- bar
|
||||
declare -- foo="bar"
|
||||
declare -- bar
|
||||
declare -a v=([0]="Y")
|
||||
r: <Y>
|
||||
v: <Y>
|
||||
declare -n ref="var"
|
||||
declare -a var=([0]="X")
|
||||
declare -n ref="var"
|
||||
declare -a var=([0]="X")
|
||||
declare -n ref="var"
|
||||
./nameref20.sub: line 23: declare: var: not found
|
||||
outside:
|
||||
declare -a foo=([0]="X")
|
||||
declare -n ref="var"
|
||||
declare -a var=([0]="X")
|
||||
outside:
|
||||
./nameref20.sub: line 38: declare: ref: not found
|
||||
./nameref20.sub: line 38: declare: var: not found
|
||||
declare -n ref="var"
|
||||
declare -- var="X"
|
||||
outside:
|
||||
./nameref20.sub: line 45: declare: ref: not found
|
||||
./nameref20.sub: line 45: declare: var: not found
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# a collection of cases in bug reports after bash-5.0-alpha was released
|
||||
|
||||
declare -n r=v[0]
|
||||
v=(X); r=Y
|
||||
declare -p ${!v*}
|
||||
printf "%s: <%s>\n" "r" "$r" "v" "$v"
|
||||
|
||||
unset -n r
|
||||
unset -v v
|
||||
|
||||
declare -n ref=var; declare -a ref
|
||||
ref=(X)
|
||||
declare -p ref var
|
||||
|
||||
unset -n ref
|
||||
unset -v var
|
||||
|
||||
f() { declare -n ref=var; declare ref=(X); declare -p ref var; };
|
||||
f
|
||||
|
||||
unset -f f
|
||||
|
||||
f() { declare -n ref=var; declare -g ref=(X); declare -p ref var; };
|
||||
|
||||
declare -n ref=foo
|
||||
f
|
||||
echo outside:
|
||||
declare -p foo
|
||||
|
||||
unset -n ref
|
||||
unset -v foo
|
||||
unset -f f
|
||||
|
||||
f() { declare -n ref=var; declare -a ref; ref=(X); declare -p ref var; }
|
||||
|
||||
f
|
||||
echo outside:
|
||||
declare -p ref var
|
||||
unset -f f
|
||||
|
||||
f() { declare -n ref=var; declare ref; ref=X; declare -p ref var; }
|
||||
|
||||
f
|
||||
echo outside:
|
||||
declare -p ref var
|
||||
|
||||
unset -f f
|
||||
@@ -86,3 +86,37 @@ test'string
|
||||
a'b'c
|
||||
foo b c baz
|
||||
foo 'bar baz
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
=====
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
=====
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
=====
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
|
||||
@@ -121,3 +121,4 @@ echo "${foo:-string \\}"
|
||||
echo ${foo:-string \\\}}
|
||||
|
||||
${THIS_SH} ./quote1.sub
|
||||
${THIS_SH} ./quote2.sub
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
x=x
|
||||
e=
|
||||
|
||||
recho ${x:+""}
|
||||
recho ${x:+ ""}
|
||||
recho ${x:+"" }
|
||||
recho ${x:+"$e"}
|
||||
recho ${x:+ "$e"}
|
||||
recho ${x:+"$e""$e"""}
|
||||
recho ${x:+"$e""$e"""}
|
||||
recho ${x:+"$e" "$e"""}
|
||||
recho ${x:+"$e""$e" ""}
|
||||
recho ${x:+ "$e""$e"""}
|
||||
|
||||
echo =====
|
||||
recho ${x:+''}
|
||||
recho ${x:+ ''}
|
||||
recho ${x:+'' }
|
||||
recho ${x:+'' ''}
|
||||
|
||||
recho ${x:+$e''}
|
||||
recho ${x:+''$e}
|
||||
|
||||
recho ${x:+''$e $e''}
|
||||
|
||||
echo =====
|
||||
recho ${x:+"$(:)"}
|
||||
recho ${x:+ "$(:)"}
|
||||
recho ${x:+"$(:)""$(:)"""}
|
||||
recho ${x:+"$(:)""$(:)"""}
|
||||
recho ${x:+"$(:)" "$(:)"""}
|
||||
recho ${x:+"$(:)""$(:)" ""}
|
||||
recho ${x:+ "$(:)""$(:)"""}
|
||||
|
||||
echo =====
|
||||
recho ${x:+"`:`"}
|
||||
recho ${x:+ "`:`"}
|
||||
recho ${x:+"`:`""`:`"""}
|
||||
recho ${x:+"`:`""`:`"""}
|
||||
recho ${x:+"`:`" "`:`"""}
|
||||
recho ${x:+"`:`""`:`" ""}
|
||||
recho ${x:+ "`:`""`:`"""}
|
||||
@@ -152,6 +152,14 @@ outside: declare -x var="global"
|
||||
foo=<unset> environment foo=
|
||||
foo=foo environment foo=foo
|
||||
foo=foo environment foo=foo
|
||||
./varenv13.sub: line 3: `var[0]': not a valid identifier
|
||||
./varenv13.sub: line 3: `var[@]': not a valid identifier
|
||||
./varenv13.sub: line 1: declare: var: not found
|
||||
./varenv13.sub: line 12: var[@]: bad array subscript
|
||||
declare -A var=([0]="X" )
|
||||
help
|
||||
./varenv13.sub: line 21: `var[0]': not a valid identifier
|
||||
1
|
||||
a=z
|
||||
a=b
|
||||
a=z
|
||||
|
||||
@@ -234,5 +234,8 @@ ${THIS_SH} ./varenv11.sub
|
||||
# temporary environment variable propagation and scoping in posix mode
|
||||
${THIS_SH} ./varenv12.sub
|
||||
|
||||
# temporary environment and invalid shell indentifier names
|
||||
${THIS_SH} ./varenv13.sub
|
||||
|
||||
# make sure variable scoping is done right
|
||||
tt() { typeset a=b;echo a=$a; };a=z;echo a=$a;tt;echo a=$a
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
f() { declare -p ${!var*} | grep ^var; declare -p var ; }
|
||||
|
||||
var[0]=X var[@]=Y f
|
||||
|
||||
unset -f f
|
||||
unset -v var
|
||||
|
||||
typeset -A var
|
||||
|
||||
f() { declare -p ${!var*}; }
|
||||
|
||||
var[0]=X var[@]=Y
|
||||
f
|
||||
|
||||
: ${THIS_SH:=./bash}
|
||||
env 'v[0]=help' ${THIS_SH} -c 'printenv "v[0]"'
|
||||
|
||||
unset -v var
|
||||
|
||||
f() { test -v 'var[0]'; echo $?; }
|
||||
var[0]=X f
|
||||
|
||||
unset -v var
|
||||
+93
-21
@@ -110,6 +110,8 @@ VAR_CONTEXT *shell_variables = (VAR_CONTEXT *)NULL;
|
||||
the environment. */
|
||||
HASH_TABLE *shell_functions = (HASH_TABLE *)NULL;
|
||||
|
||||
HASH_TABLE *invalid_env = (HASH_TABLE *)NULL;
|
||||
|
||||
#if defined (DEBUGGER)
|
||||
/* The table of shell function definitions that the user defined or that
|
||||
came from the environment. */
|
||||
@@ -247,6 +249,8 @@ static SHELL_VAR *init_funcname_var __P((void));
|
||||
|
||||
static void initialize_dynamic_variables __P((void));
|
||||
|
||||
static SHELL_VAR *bind_invalid_envvar __P((const char *, char *, int));
|
||||
|
||||
static SHELL_VAR *hash_lookup __P((const char *, HASH_TABLE *));
|
||||
static SHELL_VAR *new_shell_variable __P((const char *));
|
||||
static SHELL_VAR *make_new_variable __P((const char *, HASH_TABLE *));
|
||||
@@ -393,7 +397,7 @@ initialize_shell_variables (env, privmode)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (temp_var = bind_variable (name, string, 0))
|
||||
if (temp_var = bind_invalid_envvar (name, string, 0))
|
||||
{
|
||||
VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
|
||||
array_needs_making = 1;
|
||||
@@ -434,17 +438,24 @@ initialize_shell_variables (env, privmode)
|
||||
if (temp_var)
|
||||
VUNSETATTR (temp_var, att_readonly);
|
||||
}
|
||||
temp_var = bind_variable (name, string, 0);
|
||||
if (temp_var)
|
||||
if (legal_identifier (name))
|
||||
{
|
||||
if (legal_identifier (name))
|
||||
VSETATTR (temp_var, (att_exported | att_imported));
|
||||
else
|
||||
VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
|
||||
if (ro)
|
||||
VSETATTR (temp_var, att_readonly);
|
||||
array_needs_making = 1;
|
||||
temp_var = bind_variable (name, string, 0);
|
||||
if (temp_var)
|
||||
{
|
||||
VSETATTR (temp_var, (att_exported | att_imported));
|
||||
if (ro)
|
||||
VSETATTR (temp_var, att_readonly);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_var = bind_invalid_envvar (name, string, 0);
|
||||
if (temp_var)
|
||||
VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
|
||||
}
|
||||
if (temp_var)
|
||||
array_needs_making = 1;
|
||||
}
|
||||
|
||||
name[char_index] = '=';
|
||||
@@ -2254,6 +2265,30 @@ find_variable_nameref_for_assignment (name, flags)
|
||||
return (var);
|
||||
}
|
||||
|
||||
/* If find_variable (name) returns NULL, check that it's not a nameref
|
||||
referencing a variable that doesn't exist. If it is, return the new
|
||||
name. If not, return the original name. Kind of like the previous
|
||||
function, but dealing strictly with names. This takes assignment flags
|
||||
so it can deal with the various assignment modes used by `declare'. */
|
||||
char *
|
||||
nameref_transform_name (name, flags)
|
||||
char *name;
|
||||
int flags;
|
||||
{
|
||||
SHELL_VAR *v;
|
||||
char *newname;
|
||||
|
||||
v = 0;
|
||||
if (flags & ASS_MKLOCAL)
|
||||
v = find_variable_last_nameref (name, 1);
|
||||
else if (flags & ASS_MKGLOBAL)
|
||||
v = (flags & ASS_CHKLOCAL) ? find_variable_last_nameref (name, 1)
|
||||
: find_global_variable_last_nameref (name, 1);
|
||||
if (v && nameref_p (v) && valid_nameref_value (nameref_cell (v), 1))
|
||||
return nameref_cell (v);
|
||||
return name;
|
||||
}
|
||||
|
||||
/* Find a variable, forcing a search of the temporary environment first */
|
||||
SHELL_VAR *
|
||||
find_variable_tempenv (name)
|
||||
@@ -2700,6 +2735,9 @@ make_local_array_variable (name, assoc_ok)
|
||||
ARRAY *array;
|
||||
|
||||
var = make_local_variable (name, 0); /* XXX for now */
|
||||
/* If ASSOC_OK is non-zero, assume that we are ok with letting an assoc
|
||||
variable return to the caller without converting it. The caller will
|
||||
either flag an error or do the conversion itself. */
|
||||
if (var == 0 || array_p (var) || (assoc_ok && assoc_p (var)))
|
||||
return var;
|
||||
|
||||
@@ -2727,14 +2765,18 @@ make_new_assoc_variable (name)
|
||||
}
|
||||
|
||||
SHELL_VAR *
|
||||
make_local_assoc_variable (name)
|
||||
make_local_assoc_variable (name, array_ok)
|
||||
char *name;
|
||||
int array_ok;
|
||||
{
|
||||
SHELL_VAR *var;
|
||||
HASH_TABLE *hash;
|
||||
|
||||
var = make_local_variable (name, 0); /* XXX for now */
|
||||
if (var == 0 || assoc_p (var))
|
||||
/* If ARRAY_OK is non-zero, assume that we are ok with letting an array
|
||||
variable return to the caller without converting it. The caller will
|
||||
either flag an error or do the conversion itself. */
|
||||
if (var == 0 || assoc_p (var) || (array_ok && array_p (var)))
|
||||
return var;
|
||||
|
||||
dispose_variable_value (var);
|
||||
@@ -3157,6 +3199,17 @@ bind_global_variable (name, value, flags)
|
||||
return (bind_variable_internal (name, value, global_variables->table, 0, flags));
|
||||
}
|
||||
|
||||
static SHELL_VAR *
|
||||
bind_invalid_envvar (name, value, flags)
|
||||
const char *name;
|
||||
char *value;
|
||||
int flags;
|
||||
{
|
||||
if (invalid_env == 0)
|
||||
invalid_env = hash_create (64); /* XXX */
|
||||
return (bind_variable_internal (name, value, invalid_env, HASH_NOSRCH, flags));
|
||||
}
|
||||
|
||||
/* Make VAR, a simple shell variable, have value VALUE. Once assigned a
|
||||
value, variables are no longer invisible. This is a duplicate of part
|
||||
of the internals of bind_variable. If the variable is exported, or
|
||||
@@ -3407,6 +3460,12 @@ assign_in_env (word, flags)
|
||||
aflags |= ASS_APPEND;
|
||||
}
|
||||
|
||||
if (legal_identifier (name) == 0)
|
||||
{
|
||||
sh_invalidid (name);
|
||||
return (0);
|
||||
}
|
||||
|
||||
var = find_variable (name);
|
||||
if (var == 0)
|
||||
{
|
||||
@@ -4774,7 +4833,7 @@ maybe_make_export_env ()
|
||||
{
|
||||
register char **temp_array;
|
||||
int new_size;
|
||||
VAR_CONTEXT *tcxt;
|
||||
VAR_CONTEXT *tcxt, *icxt;
|
||||
|
||||
if (array_needs_making)
|
||||
{
|
||||
@@ -4786,7 +4845,7 @@ maybe_make_export_env ()
|
||||
variables are not (yet) exported, this will always be big enough
|
||||
for the exported variables and functions. */
|
||||
new_size = n_shell_variables () + HASH_ENTRIES (shell_functions) + 1 +
|
||||
HASH_ENTRIES (temporary_env);
|
||||
HASH_ENTRIES (temporary_env) + HASH_ENTRIES (invalid_env);
|
||||
if (new_size > export_env_size)
|
||||
{
|
||||
export_env_size = new_size;
|
||||
@@ -4807,11 +4866,23 @@ maybe_make_export_env ()
|
||||
}
|
||||
else
|
||||
tcxt = shell_variables;
|
||||
|
||||
if (invalid_env)
|
||||
{
|
||||
icxt = new_var_context ((char *)NULL, 0);
|
||||
icxt->table = invalid_env;
|
||||
icxt->down = tcxt;
|
||||
}
|
||||
else
|
||||
icxt = tcxt;
|
||||
|
||||
temp_array = make_var_export_array (tcxt);
|
||||
temp_array = make_var_export_array (icxt);
|
||||
if (temp_array)
|
||||
add_temp_array_to_env (temp_array, 0, 0);
|
||||
|
||||
if (icxt != tcxt)
|
||||
free (icxt);
|
||||
|
||||
if (tcxt != shell_variables)
|
||||
free (tcxt);
|
||||
|
||||
@@ -4928,7 +4999,7 @@ push_var_context (name, flags, tempvars)
|
||||
functions no longer behave like assignment statements preceding
|
||||
special builtins, and do not persist in the current shell environment.
|
||||
This is austin group interp #654, though nobody implements it yet. */
|
||||
posix_func_behavior = posixly_correct; /* placeholder for later */
|
||||
posix_func_behavior = posixly_correct;
|
||||
|
||||
vc = new_var_context (name, flags);
|
||||
/* Posix interp 1009, temporary assignments preceding function calls modify
|
||||
@@ -4957,24 +5028,25 @@ push_var_context (name, flags, tempvars)
|
||||
calls to the surrounding scope.
|
||||
|
||||
It takes variables out of a temporary environment hash table. We take the
|
||||
variable in data
|
||||
variable in data.
|
||||
*/
|
||||
static void
|
||||
push_func_var (data)
|
||||
PTR_T data;
|
||||
{
|
||||
SHELL_VAR *var, *v;
|
||||
int posix_func_behavior;
|
||||
int posix_var_behavior;
|
||||
|
||||
var = (SHELL_VAR *)data;
|
||||
/* As of IEEE Std 1003.1-2017, assignment statements preceding shell
|
||||
functions no longer behave like assignment statements preceding
|
||||
special builtins, and do not persist in the current shell environment. */
|
||||
posix_func_behavior = posixly_correct; /* placeholder for later */
|
||||
special builtins, and do not persist in the current shell environment.
|
||||
This is austin group interp #654, though nobody implements it yet. */
|
||||
posix_var_behavior = posixly_correct && (shell_compatibility_level < 50 || vc_isfuncenv (shell_variables) == 0);
|
||||
|
||||
if (local_p (var) && STREQ (var->name, "-"))
|
||||
set_current_options (value_cell (var));
|
||||
else if (tempvar_p (var) && (posix_func_behavior || (var->attributes & att_propagate)))
|
||||
else if (tempvar_p (var) && (posix_var_behavior || (var->attributes & att_propagate)))
|
||||
{
|
||||
/* Make sure we have a hash table to store the variable in while it is
|
||||
being propagated down to the global variables table. Create one if
|
||||
|
||||
+2
-1
@@ -278,6 +278,7 @@ extern SHELL_VAR *find_shell_variable __P((const char *));
|
||||
extern SHELL_VAR *find_tempenv_variable __P((const char *));
|
||||
extern SHELL_VAR *find_variable_no_invisible __P((const char *));
|
||||
extern SHELL_VAR *find_variable_for_assignment __P((const char *));
|
||||
extern char *nameref_transform_name __P((char *, int));
|
||||
extern SHELL_VAR *copy_variable __P((SHELL_VAR *));
|
||||
extern SHELL_VAR *make_local_variable __P((const char *, int));
|
||||
extern SHELL_VAR *bind_variable __P((const char *, char *, int));
|
||||
@@ -380,7 +381,7 @@ extern SHELL_VAR *make_new_array_variable __P((char *));
|
||||
extern SHELL_VAR *make_local_array_variable __P((char *, int));
|
||||
|
||||
extern SHELL_VAR *make_new_assoc_variable __P((char *));
|
||||
extern SHELL_VAR *make_local_assoc_variable __P((char *));
|
||||
extern SHELL_VAR *make_local_assoc_variable __P((char *, int));
|
||||
|
||||
extern void set_pipestatus_array __P((int *, int));
|
||||
extern ARRAY *save_pipestatus_array __P((void));
|
||||
|
||||
Reference in New Issue
Block a user