commit bash-20180302 snapshot

This commit is contained in:
Chet Ramey
2018-03-05 10:22:03 -05:00
parent 6ca5e50062
commit a28518042b
26 changed files with 8468 additions and 8118 deletions
+60 -16
View File
@@ -1,13 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This text is a brief description of the features that are present in
the Bash shell (version 4.4, 19 December 2017).
the Bash shell (version 4.4, 2 March 2018).
This is Edition 4.4, last updated 19 December 2017,
This is Edition 4.4, last updated 2 March 2018,
of The GNU Bash Reference Manual,
for Bash, Version 4.4.
Copyright (C) 1988-2017 Free Software Foundation, Inc.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -284,10 +284,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
<h1 class="top">Bash Features</h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 4.4, 19 December 2017).
the Bash shell (version 4.4, 2 March 2018).
The Bash home page is <a href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
<p>This is Edition 4.4, last updated 19 December 2017,
<p>This is Edition 4.4, last updated 2 March 2018,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 4.4.
</p>
@@ -1644,7 +1644,8 @@ This pipe is established before any redirections specified by the
command (see <a href="#Redirections">Redirections</a>).
The file descriptors can be utilized as arguments to shell commands
and redirections using standard word expansions.
The file descriptors are not available in subshells.
Other than those created to execute command and process substitutions,
the file descriptors are not available in subshells.
</p>
<p>The process ID of the shell spawned to execute the coprocess is
available as the value of the variable <code>NAME</code>_PID.
@@ -1930,8 +1931,10 @@ func1
variable is local to the current scope, <code>unset</code> will unset it;
otherwise the unset will refer to the variable found in any calling scope
as described above.
If a variable at the local scope is unset, it will remain so
If a variable at the current local scope is unset, it will remain so
until it is reset in that scope or until the function returns.
Once the function returns, any instance of the variable at a previous
scope will become visible.
If the unset acts on a variable at a previous scope, any instance of a
variable with that name that had been shadowed will become visible.
</p>
@@ -4252,7 +4255,7 @@ The <samp>-d</samp> option causes the shell to forget the remembered location
of each <var>name</var>.
If the <samp>-t</samp> option is supplied, the full pathname to which each
<var>name</var> corresponds is printed. If multiple <var>name</var> arguments are
supplied with <samp>-t</samp> the <var>name</var> is printed before the hashed
supplied with <samp>-t</samp>, the <var>name</var> is printed before the hashed
full pathname.
The <samp>-l</samp> option causes output to be displayed in a format
that may be reused as input.
@@ -4405,7 +4408,7 @@ expressions using a set of rules based on the number of arguments.
</p>
</dd>
<dt>1 argument</dt>
<dd><p>The expression is true if and only if the argument is not null.
<dd><p>The expression is true if, and only if, the argument is not null.
</p>
</dd>
<dt>2 arguments</dt>
@@ -5103,7 +5106,7 @@ The default index is 0.
<dd><p>Read lines from file descriptor <var>fd</var> instead of the standard input.
</p></dd>
<dt><code>-C</code></dt>
<dd><p>Evaluate <var>callback</var> each time <var>quantum</var>P lines are read.
<dd><p>Evaluate <var>callback</var> each time <var>quantum</var> lines are read.
The <samp>-c</samp> option specifies <var>quantum</var>.
</p></dd>
<dt><code>-c</code></dt>
@@ -5943,6 +5946,12 @@ option.
</p>
<p>The list of <code>shopt</code> options is:
</p><dl compact="compact">
<dt><code>assoc_expand_once</code></dt>
<dd><p>If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation and while executing
builtins that can perform variable assignments.
</p>
</dd>
<dt><code>autocd</code></dt>
<dd><p>If set, a command name that is the name of a directory is executed as if
it were the argument to the <code>cd</code> command.
@@ -6052,6 +6061,12 @@ loop state when a shell function is executed (this allows <code>break</code> or
<code>continue</code> in a shell function to affect loops in the caller&rsquo;s context).
</p>
</dd>
<dt><code>compat44</code></dt>
<dd><p>If set, Bash
saves the positional parameters to BASH_ARGV and BASH_ARGC before they are
used, regardless of whether or not extended debugging mode is enabled.
</p>
</dd>
<dt><code>complete_fullquote</code></dt>
<dd><p>If set, Bash
quotes all shell metacharacters in filenames and directory names when
@@ -6553,6 +6568,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
may result in inconsistent values.
</p>
</dd>
<dt><code>BASH_ARGV</code>
@@ -6567,6 +6584,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
may result in inconsistent values.
</p>
</dd>
<dt><code>BASH_ARGV0</code>
@@ -12441,7 +12460,7 @@ The <code>lithist</code>
shell option causes the shell to save the command with embedded newlines
instead of semicolons.
The <code>shopt</code> builtin is used to set these options.
See <a href="#Bash-Builtins">Bash Builtins</a>, for a description of <code>shopt</code>.
See <a href="#The-Shopt-Builtin">The Shopt Builtin</a>, for a description of <code>shopt</code>.
</p>
<hr>
<a name="Bash-History-Builtins"></a>
@@ -12471,8 +12490,8 @@ Both <var>first</var> and
<var>last</var> may be specified as a string (to locate the most recent
command beginning with that string) or as a number (an index into the
history list, where a negative number is used as an offset from the
current command number). If <var>last</var> is not specified it is set to
<var>first</var>. If <var>first</var> is not specified it is set to the previous
current command number). If <var>last</var> is not specified, it is set to
<var>first</var>. If <var>first</var> is not specified, it is set to the previous
command for editing and -16 for listing. If the <samp>-l</samp> flag is
given, the commands are listed on standard output. The <samp>-n</samp> flag
suppresses the command numbers when listing. The <samp>-r</samp> flag
@@ -12499,6 +12518,7 @@ and typing &lsquo;<samp>r</samp>&rsquo; re-executes the last command (see <a hre
<pre class="example">history [<var>n</var>]
history -c
history -d <var>offset</var>
history -d <var>start</var>-<var>end</var>
history [-anrw] [<var>filename</var>]
history -ps <var>arg</var>
</pre></div>
@@ -12530,6 +12550,12 @@ end of the history, and an index of &lsquo;<samp>-1</samp>&rsquo; refers to the
<code>history -d</code> command.
</p>
</dd>
<dt><code>-d <var>start</var>-<var>end</var></code></dt>
<dd><p>Delete the history entries between positions <var>start</var> and <var>end</var>,
inclusive. Positive and negative values for <var>start</var> and <var>end</var>
are interpreted as described above.
</p>
</dd>
<dt><code>-a</code></dt>
<dd><p>Append the new history lines to the history file.
These are history lines entered since the beginning of the current
@@ -12612,7 +12638,7 @@ also treated as quoted if it immediately precedes the closing double quote
in a double-quoted string.
</p>
<p>Several shell options settable with the <code>shopt</code>
builtin (see <a href="#Bash-Builtins">Bash Builtins</a>) may be used to tailor
builtin (see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>) may be used to tailor
the behavior of history expansion. If the
<code>histverify</code> shell option is enabled, and Readline
is being used, history substitutions are not immediately passed to
@@ -12955,11 +12981,27 @@ may remove or edit it.
<code>configure</code> script understands, type
</p>
<div class="example">
<pre class="example">bash-2.04$ ./configure --help
<pre class="example">bash-4.2$ ./configure --help
</pre></div>
<p>at the Bash prompt in your Bash source directory.
</p>
<p>If you want to build Bash in a directory separate from the source
directory &ndash; to build for multiple architectures, for example &ndash;
just use the full path to the configure script. The following commands
will build bash in a directory under <samp>/usr/local/build</samp> from
the source code in <samp>/usr/local/src/bash-4.4</samp>:
</p>
<div class="example">
<pre class="example">mkdir /usr/local/build/bash-4.4
cd /usr/local/build/bash-4.4
bash /usr/local/src/bash-4.4/configure
make
</pre></div>
<p>See <a href="#Compiling-For-Multiple-Architectures">Compiling For Multiple Architectures</a> for more information
about building in a directory separate from the source.
</p>
<p>If you need to do unusual things to compile Bash, please
try to figure out how <code>configure</code> could check whether or not
to do them, and mail diffs or instructions to
@@ -13021,7 +13063,9 @@ own directory. To do this, you must use a version of <code>make</code> that
supports the <code>VPATH</code> variable, such as GNU <code>make</code>.
<code>cd</code> to the
directory where you want the object files and executables to go and run
the <code>configure</code> script from the source directory. You may need to
the <code>configure</code> script from the source directory
(see <a href="#Basic-Installation">Basic Installation</a>).
You may need to
supply the <samp>--srcdir=PATH</samp> argument to tell <code>configure</code> where the
source files are. <code>configure</code> automatically checks for the
source code in the directory that <code>configure</code> is in and in &lsquo;..&rsquo;.