mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-13 07:00:49 +02:00
new option to auto-close varassign redirs; fixed some new parser error reporting issues
This commit is contained in:
+145
-128
@@ -703,8 +703,8 @@ information.
|
||||
If the pipeline is not executed asynchronously (*note Lists::), the
|
||||
shell waits for all commands in the pipeline to complete.
|
||||
|
||||
Each command in a pipeline is executed in its own subshell, which is
|
||||
a separate process (*note Command Execution Environment::). If the
|
||||
Each command in a pipeline is executed in its own "subshell", which
|
||||
is a separate process (*note Command Execution Environment::). If the
|
||||
'lastpipe' option is enabled using the 'shopt' builtin (*note The Shopt
|
||||
Builtin::), the last element of a pipeline may be run by the shell
|
||||
process when job control is not active.
|
||||
@@ -1176,9 +1176,9 @@ list may be redirected to a single stream.
|
||||
'()'
|
||||
( LIST )
|
||||
|
||||
Placing a list of commands between parentheses causes a subshell
|
||||
environment to be created (*note Command Execution Environment::),
|
||||
and each of the commands in LIST to be executed in that subshell.
|
||||
Placing a list of commands between parentheses forces the shell to
|
||||
create a subshell (*note Command Execution Environment::), and each
|
||||
of the commands in LIST is executed in that subshell environment.
|
||||
Since the LIST is executed in a subshell, variable assignments do
|
||||
not remain in effect after the subshell completes.
|
||||
|
||||
@@ -1423,7 +1423,8 @@ been shadowed will become visible.
|
||||
the 'declare' ('typeset') builtin command (*note Bash Builtins::). The
|
||||
'-F' option to 'declare' or 'typeset' will list the function names only
|
||||
(and optionally the source file and line number, if the 'extdebug' shell
|
||||
option is enabled). Functions may be exported so that subshells
|
||||
option is enabled). Functions may be exported so that child shell
|
||||
processes (those created when executing a separate shell invocation)
|
||||
automatically have them defined with the '-f' option to the 'export'
|
||||
builtin (*note Bourne Shell Builtins::).
|
||||
|
||||
@@ -1584,9 +1585,8 @@ only be referenced; assignment to them is not allowed.
|
||||
shell itself (such as the '-i' option).
|
||||
|
||||
'$'
|
||||
($$) Expands to the process ID of the shell. In a '()' subshell,
|
||||
it expands to the process ID of the invoking shell, not the
|
||||
subshell.
|
||||
($$) Expands to the process ID of the shell. In a subshell, it
|
||||
expands to the process ID of the invoking shell, not the subshell.
|
||||
|
||||
'!'
|
||||
($!) Expands to the process ID of the job most recently placed
|
||||
@@ -2382,6 +2382,14 @@ the following sub-patterns:
|
||||
'!(PATTERN-LIST)'
|
||||
Matches anything except one of the given patterns.
|
||||
|
||||
When matching filenames, the 'dotglob' shell option determines the
|
||||
set of filenames that are tested: when 'dotglob' is enabled, the set of
|
||||
filenames includes all files beginning with '.', but the filenames '.'
|
||||
and '..' must be matched by a pattern or sub-pattern that begins with a
|
||||
dot; when it is disabled, the set does not include any filenames
|
||||
beginning with "." unless the pattern or sub-pattern begins with a '.'.
|
||||
As above, '.' only has a special meaning when matching filenames.
|
||||
|
||||
Complicated extended pattern matching against long strings is slow,
|
||||
especially when the patterns contain alternations and the strings
|
||||
contain multiple matches. Using separate matches against shorter
|
||||
@@ -2421,7 +2429,8 @@ file descriptor greater than 10 and assign it to {VARNAME}. If >&- or
|
||||
<&- is preceded by {VARNAME}, the value of VARNAME defines the file
|
||||
descriptor to close. If {VARNAME} is supplied, the redirection persists
|
||||
beyond the scope of the command, allowing the shell programmer to manage
|
||||
the file descriptor's lifetime manually.
|
||||
the file descriptor's lifetime manually. The 'varredir_close' shell
|
||||
option manages this behavior (*note The Shopt Builtin::).
|
||||
|
||||
In the following descriptions, if the file descriptor number is
|
||||
omitted, and the first character of the redirection operator is '<', the
|
||||
@@ -2805,6 +2814,8 @@ inherited from the shell.
|
||||
A command invoked in this separate environment cannot affect the
|
||||
shell's execution environment.
|
||||
|
||||
A "subshell" is a copy of the shell process.
|
||||
|
||||
Command substitution, commands grouped with parentheses, and
|
||||
asynchronous commands are invoked in a subshell environment that is a
|
||||
duplicate of the shell environment, except that traps caught by the
|
||||
@@ -2960,8 +2971,8 @@ parameters are unset.
|
||||
|
||||
A shell script may be made executable by using the 'chmod' command to
|
||||
turn on the execute bit. When Bash finds such a file while searching
|
||||
the '$PATH' for a command, it spawns a subshell to execute it. In other
|
||||
words, executing
|
||||
the '$PATH' for a command, it creates a subshell to execute it. In
|
||||
other words, executing
|
||||
filename ARGUMENTS
|
||||
is equivalent to executing
|
||||
bash filename ARGUMENTS
|
||||
@@ -4871,6 +4882,12 @@ This builtin allows you to change additional shell optional behavior.
|
||||
find the directory containing the file supplied as an
|
||||
argument. This option is enabled by default.
|
||||
|
||||
'varredir_close'
|
||||
If set, the shell automatically closes file descriptors
|
||||
assigned using the '{varname}' redirection syntax (*note
|
||||
Redirections::) instead of leaving them open when the command
|
||||
completes.
|
||||
|
||||
'xpg_echo'
|
||||
If set, the 'echo' builtin expands backslash-escape sequences
|
||||
by default.
|
||||
@@ -11590,21 +11607,21 @@ D.3 Parameter and Variable Index
|
||||
| ||||