mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-08 03:02:40 +02:00
commit bash-20200327 snapshot
This commit is contained in:
@@ -121,4 +121,7 @@ extern ARRAY *array_from_string __P((char *, char *));
|
|||||||
|
|
||||||
#define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*')
|
#define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*')
|
||||||
|
|
||||||
|
/* In eval.c, but uses ARRAY_ELEMENT * */
|
||||||
|
extern int execute_array_command PARAMS((ARRAY_ELEMENT *, void *));
|
||||||
|
|
||||||
#endif /* _ARRAY_H_ */
|
#endif /* _ARRAY_H_ */
|
||||||
|
|||||||
+23
-56
@@ -1309,11 +1309,9 @@ PPAARRAAMMEETTEERRSS
|
|||||||
while the shell is running, bbaasshh enables _p_o_s_i_x _m_o_d_e, as if the
|
while the shell is running, bbaasshh enables _p_o_s_i_x _m_o_d_e, as if the
|
||||||
command _s_e_t _-_o _p_o_s_i_x had been executed. When the shell enters
|
command _s_e_t _-_o _p_o_s_i_x had been executed. When the shell enters
|
||||||
_p_o_s_i_x _m_o_d_e, it sets this variable if it was not already set.
|
_p_o_s_i_x _m_o_d_e, it sets this variable if it was not already set.
|
||||||
PPRROOMMPPTT__CCOOMMMMAANNDDSS
|
PPRROOMMPPTT__CCOOMMMMAANNDD
|
||||||
If this array variable is set, the value of each set element is
|
If set, the value is executed as a command prior to issuing each
|
||||||
executed as a command prior to issuing each primary prompt. If
|
primary prompt.
|
||||||
this is not set, but PPRROOMMPPTT__CCOOMMMMAANNDD is set to a value, its value
|
|
||||||
is used as a command to execute instead.
|
|
||||||
PPRROOMMPPTT__DDIIRRTTRRIIMM
|
PPRROOMMPPTT__DDIIRRTTRRIIMM
|
||||||
If set to a number greater than zero, the value is used as the
|
If set to a number greater than zero, the value is used as the
|
||||||
number of trailing directory components to retain when expanding
|
number of trailing directory components to retain when expanding
|
||||||
@@ -1429,22 +1427,14 @@ PPAARRAAMMEETTEERRSS
|
|||||||
rreeaaddoonnllyy builtins. Each attribute applies to all members of an array.
|
rreeaaddoonnllyy builtins. Each attribute applies to all members of an array.
|
||||||
|
|
||||||
Arrays are assigned to using compound assignments of the form
|
Arrays are assigned to using compound assignments of the form
|
||||||
_n_a_m_e=((value_1 ... value_n)), where each _v_a_l_u_e may be of the form [_s_u_b_-
|
_n_a_m_e=((value_1 ... value_n)), where each _v_a_l_u_e is of the form [_s_u_b_-
|
||||||
_s_c_r_i_p_t]=_s_t_r_i_n_g. Indexed array assignments do not require anything but
|
_s_c_r_i_p_t]=_s_t_r_i_n_g. Indexed array assignments do not require anything but
|
||||||
_s_t_r_i_n_g. When assigning to indexed arrays, if the optional brackets and
|
_s_t_r_i_n_g. When assigning to indexed arrays, if the optional brackets and
|
||||||
subscript are supplied, that index is assigned to; otherwise the index
|
subscript are supplied, that index is assigned to; otherwise the index
|
||||||
of the element assigned is the last index assigned to by the statement
|
of the element assigned is the last index assigned to by the statement
|
||||||
plus one. Indexing starts at zero.
|
plus one. Indexing starts at zero.
|
||||||
|
|
||||||
When assigning to an associative array, the words in a compound assign-
|
When assigning to an associative array, the subscript is required.
|
||||||
ment may be either assignment statements, for which the subscript is
|
|
||||||
required, or a list of words that is interpreted as a sequence of al-
|
|
||||||
ternating keys and values: _n_a_m_e=(( _k_e_y_1 _v_a_l_u_e_1 _k_e_y_2 _v_a_l_u_e_2 ...)). These
|
|
||||||
are treated identically to _n_a_m_e=(( [_k_e_y_1]=_v_a_l_u_e_1 [_k_e_y_2]=_v_a_l_u_e_2 ...)).
|
|
||||||
The first word in the list determines how the remaining words are in-
|
|
||||||
terpreted; all assignments in a list must be of the same type. When
|
|
||||||
using key/value pairs, the keys may not be missing or empty; a final
|
|
||||||
missing value is treated like the empty string.
|
|
||||||
|
|
||||||
This syntax is also accepted by the ddeeccllaarree builtin. Individual array
|
This syntax is also accepted by the ddeeccllaarree builtin. Individual array
|
||||||
elements may be assigned to using the _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e syntax in-
|
elements may be assigned to using the _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e syntax in-
|
||||||
@@ -1835,15 +1825,6 @@ EEXXPPAANNSSIIOONN
|
|||||||
itself, depending on the value of _o_p_e_r_a_t_o_r. Each _o_p_e_r_a_t_o_r is a
|
itself, depending on the value of _o_p_e_r_a_t_o_r. Each _o_p_e_r_a_t_o_r is a
|
||||||
single letter:
|
single letter:
|
||||||
|
|
||||||
UU The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
|
||||||
with lowercase alphabetic characters converted to upper-
|
|
||||||
case.
|
|
||||||
uu The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
|
||||||
with the first character converted to uppercase, if it is
|
|
||||||
alphabetic.
|
|
||||||
LL The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
|
||||||
with uppercase alphabetic characters converted to lower-
|
|
||||||
case.
|
|
||||||
QQ The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
QQ The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
||||||
quoted in a format that can be reused as input.
|
quoted in a format that can be reused as input.
|
||||||
EE The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
EE The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r
|
||||||
@@ -1855,9 +1836,6 @@ EEXXPPAANNSSIIOONN
|
|||||||
AA The expansion is a string in the form of an assignment
|
AA The expansion is a string in the form of an assignment
|
||||||
statement or ddeeccllaarree command that, if evaluated, will
|
statement or ddeeccllaarree command that, if evaluated, will
|
||||||
recreate _p_a_r_a_m_e_t_e_r with its attributes and value.
|
recreate _p_a_r_a_m_e_t_e_r with its attributes and value.
|
||||||
KK Identical to AA, except that it prints compound assignment
|
|
||||||
statements that recreate associative arrays as a sequence
|
|
||||||
of key-value pairs (see AArrrraayyss above).
|
|
||||||
aa The expansion is a string consisting of flag values rep-
|
aa The expansion is a string consisting of flag values rep-
|
||||||
resenting _p_a_r_a_m_e_t_e_r's attributes.
|
resenting _p_a_r_a_m_e_t_e_r's attributes.
|
||||||
|
|
||||||
@@ -3533,14 +3511,10 @@ RREEAADDLLIINNEE
|
|||||||
if the current Readline line does not take up more than one
|
if the current Readline line does not take up more than one
|
||||||
physical line or if the length of the current Readline line is
|
physical line or if the length of the current Readline line is
|
||||||
not greater than the length of the prompt plus the screen width.
|
not greater than the length of the prompt plus the screen width.
|
||||||
cclleeaarr--ddiissppllaayy ((MM--CC--ll))
|
|
||||||
Clear the screen and, if possible, the terminal's scrollback
|
|
||||||
buffer, then redraw the current line, leaving the current line
|
|
||||||
at the top of the screen.
|
|
||||||
cclleeaarr--ssccrreeeenn ((CC--ll))
|
cclleeaarr--ssccrreeeenn ((CC--ll))
|
||||||
Clear the screen, then redraw the current line, leaving the cur-
|
Clear the screen leaving the current line at the top of the
|
||||||
rent line at the top of the screen. With an argument, refresh
|
screen. With an argument, refresh the current line without
|
||||||
the current line without clearing the screen.
|
clearing the screen.
|
||||||
rreeddrraaww--ccuurrrreenntt--lliinnee
|
rreeddrraaww--ccuurrrreenntt--lliinnee
|
||||||
Refresh the current line.
|
Refresh the current line.
|
||||||
|
|
||||||
@@ -4643,8 +4617,8 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
|||||||
is resumed. The return value is 0 unless _n is not greater than
|
is resumed. The return value is 0 unless _n is not greater than
|
||||||
or equal to 1.
|
or equal to 1.
|
||||||
|
|
||||||
ddeeccllaarree [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
ddeeccllaarree [--aaAAffFFggiillnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
||||||
ttyyppeesseett [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
ttyyppeesseett [--aaAAffFFggiillnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
||||||
Declare variables and/or give them attributes. If no _n_a_m_es are
|
Declare variables and/or give them attributes. If no _n_a_m_es are
|
||||||
given then display the values of variables. The --pp option will
|
given then display the values of variables. The --pp option will
|
||||||
display the attributes and values of each _n_a_m_e. When --pp is used
|
display the attributes and values of each _n_a_m_e. When --pp is used
|
||||||
@@ -4661,13 +4635,9 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
|||||||
_n_a_m_e is defined are displayed as well. The --FF option implies
|
_n_a_m_e is defined are displayed as well. The --FF option implies
|
||||||
--ff. The --gg option forces variables to be created or modified at
|
--ff. The --gg option forces variables to be created or modified at
|
||||||
the global scope, even when ddeeccllaarree is executed in a shell func-
|
the global scope, even when ddeeccllaarree is executed in a shell func-
|
||||||
tion. It is ignored in all other cases. The --II option causes
|
tion. It is ignored in all other cases. The following options
|
||||||
local variables to inherit the attributes (except the _n_a_m_e_r_e_f
|
can be used to restrict output to variables with the specified
|
||||||
attribute) and value of any existing variable with the same _n_a_m_e
|
attribute or to give variables attributes:
|
||||||
at a surrounding scope. If there is no existing variable, the
|
|
||||||
local variable is initially unset. The following options can be
|
|
||||||
used to restrict output to variables with the specified attri-
|
|
||||||
bute or to give variables attributes:
|
|
||||||
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
|
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
|
||||||
above).
|
above).
|
||||||
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
|
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
|
||||||
@@ -6000,7 +5970,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
|||||||
function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true
|
function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true
|
||||||
if all of the arguments are found, false if any are not found.
|
if all of the arguments are found, false if any are not found.
|
||||||
|
|
||||||
uulliimmiitt [--HHSSaabbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_l_i_m_i_t]]
|
uulliimmiitt [--HHSSaabbccddeeffiikkllmmnnppqqrrssttuuvvxxPPTT [_l_i_m_i_t]]
|
||||||
Provides control over the resources available to the shell and
|
Provides control over the resources available to the shell and
|
||||||
to processes started by it, on systems that allow such control.
|
to processes started by it, on systems that allow such control.
|
||||||
The --HH and --SS options specify that the hard or soft limit is set
|
The --HH and --SS options specify that the hard or soft limit is set
|
||||||
@@ -6041,19 +6011,16 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
|||||||
shell and, on some systems, to its children
|
shell and, on some systems, to its children
|
||||||
--xx The maximum number of file locks
|
--xx The maximum number of file locks
|
||||||
--PP The maximum number of pseudoterminals
|
--PP The maximum number of pseudoterminals
|
||||||
--RR The maximum time a real-time process can run before
|
|
||||||
blocking, in microseconds
|
|
||||||
--TT The maximum number of threads
|
--TT The maximum number of threads
|
||||||
|
|
||||||
If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the
|
If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the
|
||||||
new value of the specified resource. If no option is given,
|
new value of the specified resource. If no option is given,
|
||||||
then --ff is assumed. Values are in 1024-byte increments, except
|
then --ff is assumed. Values are in 1024-byte increments, except
|
||||||
for --tt, which is in seconds; --RR, which is in microseconds; --pp,
|
for --tt, which is in seconds; --pp, which is in units of 512-byte
|
||||||
which is in units of 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and
|
blocks; --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled values;
|
||||||
--uu, which are unscaled values; and, when in posix mode, --cc and
|
and, when in posix mode, --cc and --ff, which are in 512-byte incre-
|
||||||
--ff, which are in 512-byte increments. The return status is 0
|
ments. The return status is 0 unless an invalid option or argu-
|
||||||
unless an invalid option or argument is supplied, or an error
|
ment is supplied, or an error occurs while setting a new limit.
|
||||||
occurs while setting a new limit.
|
|
||||||
|
|
||||||
uummaasskk [--pp] [--SS] [_m_o_d_e]
|
uummaasskk [--pp] [--SS] [_m_o_d_e]
|
||||||
The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
|
The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
|
||||||
@@ -6242,4 +6209,4 @@ BBUUGGSS
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
GNU Bash 5.0 2020 March 24 BASH(1)
|
GNU Bash 5.0 2020 January 29 BASH(1)
|
||||||
|
|||||||
Binary file not shown.
+5651
-5713
File diff suppressed because it is too large
Load Diff
@@ -260,7 +260,7 @@ send_pwd_to_eterm ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined (ARRAY_VARS)
|
#if defined (ARRAY_VARS)
|
||||||
void
|
int
|
||||||
execute_array_command (ae, v)
|
execute_array_command (ae, v)
|
||||||
ARRAY_ELEMENT *ae;
|
ARRAY_ELEMENT *ae;
|
||||||
void *v;
|
void *v;
|
||||||
@@ -271,6 +271,7 @@ execute_array_command (ae, v)
|
|||||||
command = element_value (ae);
|
command = element_value (ae);
|
||||||
if (command && *command)
|
if (command && *command)
|
||||||
execute_variable_command (command, tag);
|
execute_variable_command (command, tag);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -294,6 +295,7 @@ execute_prompt_command ()
|
|||||||
if (command_to_execute && *command_to_execute)
|
if (command_to_execute && *command_to_execute)
|
||||||
execute_variable_command (command_to_execute, "PROMPT_COMMAND");
|
execute_variable_command (command_to_execute, "PROMPT_COMMAND");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the YACC-generated parser and return the status of the parse.
|
/* Call the YACC-generated parser and return the status of the parse.
|
||||||
Input is read from the current input stream (bash_input). yyparse
|
Input is read from the current input stream (bash_input). yyparse
|
||||||
leaves the parsed command in the global variable GLOBAL_COMMAND.
|
leaves the parsed command in the global variable GLOBAL_COMMAND.
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||||
THIS_SH=$BUILD_DIR/bash
|
THIS_SH=$BUILD_DIR/bash
|
||||||
PATH=$PATH:$BUILD_DIR
|
PATH=$PATH:$BUILD_DIR
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user