commit bash-20100722 snapshot

This commit is contained in:
Chet Ramey
2011-12-12 22:03:26 -05:00
parent e054386f3f
commit 9ec5ed6640
69 changed files with 15989 additions and 9437 deletions
+44 -23
View File
@@ -265,9 +265,11 @@ SSHHEELLLL GGRRAAMMMMAARR
If the ttiimmee reserved word precedes a pipeline, the elapsed as well as
user and system time consumed by its execution are reported when the
pipeline terminates. The --pp option changes the output format to that
specified by POSIX. The TTIIMMEEFFOORRMMAATT variable may be set to a format
string that specifies how the timing information should be displayed;
see the description of TTIIMMEEFFOORRMMAATT under SShheellll VVaarriiaabblleess below.
specified by POSIX. When the shell is in _p_o_s_i_x _m_o_d_e, it does not rec-
ognize ttiimmee as a reserved word if the next token begins with a `-'.
The TTIIMMEEFFOORRMMAATT variable may be set to a format string that specifies
how the timing information should be displayed; see the description of
TTIIMMEEFFOORRMMAATT under SShheellll VVaarriiaabblleess below.
When the shell is in _p_o_s_i_x _m_o_d_e, ttiimmee may be followed by a newline. In
this case, the shell displays the total user and system time consumed
@@ -506,7 +508,8 @@ SSHHEELLLL GGRRAAMMMMAARR
executes a compound command with a new set of positional parameters.
Shell functions are declared as follows:
[ ffuunnccttiioonn ] _n_a_m_e () _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n]
_n_a_m_e () _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n]
ffuunnccttiioonn _n_a_m_e [()] _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n]
This defines a function named _n_a_m_e. The reserved word ffuunnccttiioonn
is optional. If the ffuunnccttiioonn reserved word is supplied, the
parentheses are optional. The _b_o_d_y of the function is the com-
@@ -757,22 +760,24 @@ PPAARRAAMMEETTEERRSS
The command argument to the --cc invocation option.
BBAASSHH__LLIINNEENNOO
An array variable whose members are the line numbers in source
files corresponding to each member of FFUUNNCCNNAAMMEE.
$${{BBAASSHH__LLIINNEENNOO[[_$_i]]}} is the line number in the source file where
$${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or $${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if refer-
enced within another shell function). The corresponding source
file name is $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}}. Use LLIINNEENNOO to obtain the cur-
rent line number.
files where each corresponding member of FFUUNNCCNNAAMMEE was invoked.
$${{BBAASSHH__LLIINNEENNOO[[_$_i]]}} is the line number in the source file
($${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}) where $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or
$${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if referenced within another shell func-
tion). Use LLIINNEENNOO to obtain the current line number.
BBAASSHH__RREEMMAATTCCHH
An array variable whose members are assigned by the ==~~ binary
operator to the [[[[ conditional command. The element with index
0 is the portion of the string matching the entire regular
expression. The element with index _n is the portion of the
An array variable whose members are assigned by the ==~~ binary
operator to the [[[[ conditional command. The element with index
0 is the portion of the string matching the entire regular
expression. The element with index _n is the portion of the
string matching the _nth parenthesized subexpression. This vari-
able is read-only.
BBAASSHH__SSOOUURRCCEE
An array variable whose members are the source filenames corre-
sponding to the elements in the FFUUNNCCNNAAMMEE array variable.
An array variable whose members are the source filenames where
the corresponding shell function names in the FFUUNNCCNNAAMMEE array
variable are defined. The shell function $${{FFUUNNCCNNAAMMEE[[_$_i]]}} is
defined in the file $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}} and called from
$${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}.
BBAASSHH__SSUUBBSSHHEELLLL
Incremented by one each time a subshell or subshell environment
is spawned. The initial value is 0.
@@ -863,10 +868,19 @@ PPAARRAAMMEETTEERRSS
An array variable containing the names of all shell functions
currently in the execution call stack. The element with index 0
is the name of any currently-executing shell function. The bot-
tom-most element is "main". This variable exists only when a
shell function is executing. Assignments to FFUUNNCCNNAAMMEE have no
effect and return an error status. If FFUUNNCCNNAAMMEE is unset, it
loses its special properties, even if it is subsequently reset.
tom-most element (the one with the highest index) is "main".
This variable exists only when a shell function is executing.
Assignments to FFUUNNCCNNAAMMEE have no effect and return an error sta-
tus. If FFUUNNCCNNAAMMEE is unset, it loses its special properties,
even if it is subsequently reset.
This variable can be used with BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE.
Each element of FFUUNNCCNNAAMMEE has corresponding elements in
BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE to describe the call stack. For
instance, $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called from the file
$${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}} at line number $${{BBAASSHH__LLIINNEENNOO[[_$_i]]}}. The
ccaalllleerr builtin displays the current call stack using this infor-
mation.
GGRROOUUPPSS An array variable containing the list of groups of which the
current user is a member. Assignments to GGRROOUUPPSS have no effect
@@ -2087,7 +2101,9 @@ FFUUNNCCTTIIOONNSS
tically-named entries in the environment passed to the shell's chil-
dren. Care should be taken in cases where this may cause a problem.
Functions may be recursive. No limit is imposed on the number of
Functions may be recursive. The FFUUNNCCNNEESSTT variable may be used to limit
the depth of the function call stack and restrict the number of func-
tion invocations. By default, no limit is imposed on the number of
recursive calls.
AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN
@@ -4157,7 +4173,8 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
\\aa alert (bell)
\\bb backspace
\\cc suppress further output
\\ee an escape character
\\ee
\\EE an escape character
\\ff form feed
\\nn new line
\\rr carriage return
@@ -5032,6 +5049,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
and all remaining characters on that line to be ignored
in an interactive shell (see CCOOMMMMEENNTTSS above). This
option is enabled by default.
llaassttppiippee
If set, and job control is not active, the shell runs
the last command of a pipeline not executed in the back-
ground in the current shell environment.
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
@@ -5433,4 +5454,4 @@ BBUUGGSS
GNU Bash-4.1 2010 June 12 BASH(1)
GNU Bash-4.2 2010 July 21 BASH(1)