mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
bash-5.0-beta release
This commit is contained in:
+1269
-1240
File diff suppressed because it is too large
Load Diff
+61
-24
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Mar 15 11:30:03 EDT 2018
|
||||
.\" Last Change: Tue Aug 7 12:01:07 EDT 2018
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2018 March 15" "GNU Bash 5.0"
|
||||
.TH BASH 1 "2018 August 7" "GNU Bash 5.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -739,7 +739,7 @@ to be matched as a string.
|
||||
An additional binary operator, \fB=~\fP, is available, with the same
|
||||
precedence as \fB==\fP and \fB!=\fP.
|
||||
When it is used, the string to the right of the operator is considered
|
||||
an extended regular expression and matched accordingly (as in \fIregex\fP(3)).
|
||||
a POSIX extended regular expression and matched accordingly (as in \fIregex\fP(3)).
|
||||
The return value is 0 if the string matches
|
||||
the pattern, and 1 otherwise.
|
||||
If the regular expression is syntactically incorrect, the conditional
|
||||
@@ -1357,7 +1357,14 @@ If
|
||||
is null, the parameters are joined without intervening separators.
|
||||
.TP
|
||||
.B @
|
||||
Expands to the positional parameters, starting from one. When the
|
||||
Expands to the positional parameters, starting from one.
|
||||
In contexts where word splitting is performed, this expands each
|
||||
positional parameter to a separate word; if not within double
|
||||
quotes, these words are subject to word splitting.
|
||||
In contexts where word splitting is not performed,
|
||||
this expands to a single word
|
||||
with each positional parameter separated by a space.
|
||||
When the
|
||||
expansion occurs within double quotes, each parameter expands to a
|
||||
separate word. That is, "\fB$@\fP" is equivalent to
|
||||
"\fB$1\fP" "\fB$2\fP" ...
|
||||
@@ -1499,7 +1506,8 @@ only when in extended debugging mode (see the description of the
|
||||
option to the
|
||||
.B shopt
|
||||
builtin below).
|
||||
Setting \fBextdebug\fP after the shell has started to execute a script
|
||||
Setting \fBextdebug\fP after the shell has started to execute a script,
|
||||
or referencing this variable when \fBextdebug\fP is not set,
|
||||
may result in inconsistent values.
|
||||
.TP
|
||||
.B BASH_ARGV
|
||||
@@ -1519,7 +1527,8 @@ only when in extended debugging mode
|
||||
option to the
|
||||
.B shopt
|
||||
builtin below).
|
||||
Setting \fBextdebug\fP after the shell has started to execute a script
|
||||
Setting \fBextdebug\fP after the shell has started to execute a script,
|
||||
or referencing this variable when \fBextdebug\fP is not set,
|
||||
may result in inconsistent values.
|
||||
.TP
|
||||
.B BASH_ARGV0
|
||||
@@ -2072,7 +2081,7 @@ line editing.
|
||||
Similar to
|
||||
.SM
|
||||
.BR BASH_ENV ;
|
||||
used when the shell is invoked in POSIX mode.
|
||||
used when the shell is invoked in \fIposix mode\fP.
|
||||
.TP
|
||||
.B EXECIGNORE
|
||||
A colon-separated list of shell patterns (see \fBPattern Matching\fP)
|
||||
@@ -2277,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.
|
||||
@@ -2400,6 +2414,8 @@ running, \fBbash\fP enables \fIposix mode\fP, as if the command
|
||||
.if t \f(CWset -o posix\fP
|
||||
.if n \fIset -o posix\fP
|
||||
had been executed.
|
||||
When the shell enters \fIposix mode\fP, it sets this variable if it was
|
||||
not already set.
|
||||
.TP
|
||||
.B PROMPT_COMMAND
|
||||
If set, the value is executed as a command prior to issuing each primary
|
||||
@@ -2914,6 +2930,14 @@ and
|
||||
.SM
|
||||
.BR CDPATH ,
|
||||
and the shell assigns the expanded value.
|
||||
.PP
|
||||
Bash also performs tilde expansion on words satisfying the conditions of
|
||||
variable assignments (as described above under
|
||||
.SM
|
||||
.BR PARAMETERS )
|
||||
when they appear as arguments to simple commands.
|
||||
Bash does not do this, except for the \fIdeclaration\fP commands listed
|
||||
above, when in \fIposix mode\fP.
|
||||
.SS Parameter Expansion
|
||||
.PP
|
||||
The `\fB$\fP' character introduces parameter expansion,
|
||||
@@ -2945,16 +2969,16 @@ The \fIparameter\fP is a shell parameter as described above
|
||||
.PP
|
||||
If the first character of \fIparameter\fP is an exclamation point (\fB!\fP),
|
||||
and \fIparameter\fP is not a \fInameref\fP,
|
||||
it introduces a level of variable indirection.
|
||||
\fBBash\fP uses the value of the variable formed from the rest of
|
||||
\fIparameter\fP 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 \fIparameter\fP itself.
|
||||
it introduces a level of indirection.
|
||||
\fBBash\fP uses the value formed by expanding the rest of
|
||||
\fIparameter\fP as the new \fIparameter\fP; this is then
|
||||
expanded and that value is used in the rest of the expansion, rather
|
||||
than the expansion of the original \fIparameter\fP.
|
||||
This is known as \fIindirect expansion\fP.
|
||||
The value is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
If \fIparameter\fP is a nameref, this expands to the name of the
|
||||
variable referenced by \fIparameter\fP instead of performing the
|
||||
parameter referenced by \fIparameter\fP instead of performing the
|
||||
complete indirect expansion.
|
||||
The exceptions to this are the expansions of ${\fB!\fP\fIprefix\fP\fB*\fP} and
|
||||
${\fB!\fP\fIname\fP[\fI@\fP]} described below.
|
||||
@@ -4821,7 +4845,7 @@ subshell environment. Changes made to the subshell environment
|
||||
cannot affect the shell's execution environment.
|
||||
.PP
|
||||
Subshells spawned to execute command substitutions inherit the value of
|
||||
the \fB\-e\fP option from the parent shell. When not in \fIposix\fP mode,
|
||||
the \fB\-e\fP option from the parent shell. When not in \fIposix mode\fP,
|
||||
\fBbash\fP clears the \fB\-e\fP option in such subshells.
|
||||
.PP
|
||||
If a command is followed by a \fB&\fP and job control is not active, the
|
||||
@@ -7640,12 +7664,12 @@ will be displayed.
|
||||
The return value is true unless an invalid option is supplied, or no
|
||||
matches were generated.
|
||||
.TP
|
||||
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DE\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
|
||||
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
|
||||
.br
|
||||
[\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP]
|
||||
.PD 0
|
||||
.TP
|
||||
\fBcomplete\fP \fB\-pr\fP [\fB\-DE\fP] [\fIname\fP ...]
|
||||
\fBcomplete\fP \fB\-pr\fP [\fB\-DEI\fP] [\fIname\fP ...]
|
||||
.PD
|
||||
Specify how arguments to each \fIname\fP should be completed.
|
||||
If the \fB\-p\fP option is supplied, or if no options are supplied,
|
||||
@@ -7654,12 +7678,21 @@ them to be reused as input.
|
||||
The \fB\-r\fP option removes a completion specification for
|
||||
each \fIname\fP, or, if no \fIname\fPs are supplied, all
|
||||
completion specifications.
|
||||
The \fB\-D\fP option indicates that the remaining options and actions should
|
||||
The \fB\-D\fP option indicates that other supplied options and actions should
|
||||
apply to the ``default'' command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The \fB\-E\fP option indicates that the remaining options and actions should
|
||||
The \fB\-E\fP option indicates that other supplied options and actions should
|
||||
apply to ``empty'' command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
The \fB\-I\fP option indicates that other supplied options and actions should
|
||||
apply to completion on the inital non-assignment word on the line, or after
|
||||
a command delimiter such as \fB;\fP or \fB|\fP, which is usually command
|
||||
name completion.
|
||||
If multiple options are supplied, the \fB\-D\fP option takes precedence
|
||||
over \fB\-E\fP, and both take precedence over \fB\-I\fP.
|
||||
If any of \fB\-D\fP, \fB\-E\fP, or \fB\-I\fP are supplied, any other
|
||||
\fIname\fP arguments are ignored; these completions only apply to the case
|
||||
specified by the option.
|
||||
.sp 1
|
||||
The process of applying these completion specifications when word completion
|
||||
is attempted is described above under \fBProgrammable Completion\fP.
|
||||
@@ -7855,7 +7888,7 @@ a \fIname\fP for which no specification exists, or
|
||||
an error occurs adding a completion specification.
|
||||
.RE
|
||||
.TP
|
||||
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DE\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
|
||||
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DEI\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
|
||||
Modify completion options for each \fIname\fP according to the
|
||||
\fIoption\fPs, or for the
|
||||
currently-executing completion if no \fIname\fPs are supplied.
|
||||
@@ -7863,12 +7896,16 @@ If no \fIoption\fPs are given, display the completion options for each
|
||||
\fIname\fP or the current completion.
|
||||
The possible values of \fIoption\fP are those valid for the \fBcomplete\fP
|
||||
builtin described above.
|
||||
The \fB\-D\fP option indicates that the remaining options should
|
||||
The \fB\-D\fP option indicates that other supplied options should
|
||||
apply to the ``default'' command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The \fB\-E\fP option indicates that the remaining options should
|
||||
The \fB\-E\fP option indicates that other supplied options should
|
||||
apply to ``empty'' command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
The \fB\-I\fP option indicates that other supplied options should
|
||||
apply to completion on the inital non-assignment word on the line,
|
||||
or after a command delimiter such as \fB;\fP or \fB|\fP, which is usually
|
||||
command name completion.
|
||||
.sp 1
|
||||
The return value is true unless an invalid option is supplied, an attempt
|
||||
is made to modify the options for a \fIname\fP for which no completion
|
||||
@@ -9271,7 +9308,7 @@ Without options, the name and value of each shell variable are displayed
|
||||
in a format that can be reused as input
|
||||
for setting or resetting the currently-set variables.
|
||||
Read-only variables cannot be reset.
|
||||
In \fIposix\fP mode, only shell variables are listed.
|
||||
In \fIposix mode\fP, only shell variables are listed.
|
||||
The output is sorted according to the current locale.
|
||||
When options are specified, they set or unset shell attributes.
|
||||
Any arguments remaining after option processing are treated
|
||||
@@ -9817,7 +9854,7 @@ interrupt; previous versions continue with the next command in the list.
|
||||
.B compat41
|
||||
If set,
|
||||
.BR bash ,
|
||||
when in \fIposix\fP mode, treats a single quote in a double-quoted
|
||||
when in \fIposix mode\fP, treats a single quote in a double-quoted
|
||||
parameter expansion as a special character. The single quotes must match
|
||||
(an even number) and the characters between the single quotes are considered
|
||||
quoted. This is the behavior of posix mode through version 4.1.
|
||||
@@ -10589,7 +10626,7 @@ which is in units of 512-byte blocks;
|
||||
and
|
||||
.BR \-u ,
|
||||
which are unscaled values;
|
||||
and, when in Posix mode,
|
||||
and, when in posix mode,
|
||||
.B \-c
|
||||
and
|
||||
.BR \-f ,
|
||||
|
||||
+65
-25
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2018 March 15<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2018 August 7<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -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
|
||||
@@ -1738,7 +1738,14 @@ is null, the parameters are joined without intervening separators.
|
||||
<DT><B>@</B>
|
||||
|
||||
<DD>
|
||||
Expands to the positional parameters, starting from one. When the
|
||||
Expands to the positional parameters, starting from one.
|
||||
In contexts where word splitting is performed, this expands each
|
||||
positional parameter to a separate word; if not within double
|
||||
quotes, these words are subject to word splitting.
|
||||
In contexts where word splitting is not performed,
|
||||
this expands to a single word
|
||||
with each positional parameter separated by a space.
|
||||
When the
|
||||
expansion occurs within double quotes, each parameter expands to a
|
||||
separate word. That is, "<B>$@</B>" is equivalent to
|
||||
"<B>$1</B>" "<B>$2</B>" ...
|
||||
@@ -1922,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>
|
||||
|
||||
@@ -1947,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>
|
||||
|
||||
@@ -2634,7 +2643,7 @@ Similar to
|
||||
<FONT SIZE=-1><B>BASH_ENV</B>;
|
||||
|
||||
</FONT>
|
||||
used when the shell is invoked in POSIX mode.
|
||||
used when the shell is invoked in <I>posix mode</I>.
|
||||
<DT><B>EXECIGNORE</B>
|
||||
|
||||
<DD>
|
||||
@@ -2887,6 +2896,12 @@ startup file, overriding the default of
|
||||
|
||||
</FONT>
|
||||
below).
|
||||
<DT><B>INSIDE_EMACS</B>
|
||||
|
||||
<DD>
|
||||
If this variable appears in the environment when the shell starts,
|
||||
<B>bash</B> assumes that it is running inside an Emacs shell buffer
|
||||
and may disable line editing, depending on the value of <B>TERM</B>.
|
||||
<DT><B>LANG</B>
|
||||
|
||||
<DD>
|
||||
@@ -3043,6 +3058,8 @@ running, <B>bash</B> enables <I>posix mode</I>, as if the command
|
||||
<TT>set -o posix</TT>
|
||||
|
||||
had been executed.
|
||||
When the shell enters <I>posix mode</I>, it sets this variable if it was
|
||||
not already set.
|
||||
<DT><B>PROMPT_COMMAND</B>
|
||||
|
||||
<DD>
|
||||
@@ -3698,6 +3715,16 @@ and
|
||||
|
||||
</FONT>
|
||||
and the shell assigns the expanded value.
|
||||
<P>
|
||||
|
||||
Bash also performs tilde expansion on words satisfying the conditions of
|
||||
variable assignments (as described above under
|
||||
<FONT SIZE=-1><B>PARAMETERS</B>)
|
||||
|
||||
</FONT>
|
||||
when they appear as arguments to simple commands.
|
||||
Bash does not do this, except for the <I>declaration</I> commands listed
|
||||
above, when in <I>posix mode</I>.
|
||||
<A NAME="lbBB"> </A>
|
||||
<H4>Parameter Expansion</H4>
|
||||
|
||||
@@ -3738,16 +3765,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.
|
||||
@@ -6125,7 +6152,7 @@ cannot affect the shell's execution environment.
|
||||
<P>
|
||||
|
||||
Subshells spawned to execute command substitutions inherit the value of
|
||||
the <B>-e</B> option from the parent shell. When not in <I>posix</I> mode,
|
||||
the <B>-e</B> option from the parent shell. When not in <I>posix mode</I>,
|
||||
<B>bash</B> clears the <B>-e</B> option in such subshells.
|
||||
<P>
|
||||
|
||||
@@ -9745,12 +9772,12 @@ will be displayed.
|
||||
<P>
|
||||
The return value is true unless an invalid option is supplied, or no
|
||||
matches were generated.
|
||||
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DE</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
|
||||
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DEI</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
|
||||
<BR>
|
||||
|
||||
[<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>]
|
||||
|
||||
<DT><B>complete</B> <B>-pr</B> [<B>-DE</B>] [<I>name</I> ...]<DD>
|
||||
<DT><B>complete</B> <B>-pr</B> [<B>-DEI</B>] [<I>name</I> ...]<DD>
|
||||
|
||||
Specify how arguments to each <I>name</I> should be completed.
|
||||
If the <B>-p</B> option is supplied, or if no options are supplied,
|
||||
@@ -9759,12 +9786,21 @@ them to be reused as input.
|
||||
The <B>-r</B> option removes a completion specification for
|
||||
each <I>name</I>, or, if no <I>name</I>s are supplied, all
|
||||
completion specifications.
|
||||
The <B>-D</B> option indicates that the remaining options and actions should
|
||||
The <B>-D</B> option indicates that other supplied options and actions should
|
||||
apply to the ``default'' command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The <B>-E</B> option indicates that the remaining options and actions should
|
||||
The <B>-E</B> option indicates that other supplied options and actions should
|
||||
apply to ``empty'' command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
The <B>-I</B> option indicates that other supplied options and actions should
|
||||
apply to completion on the inital non-assignment word on the line, or after
|
||||
a command delimiter such as <B>;</B> or <B>|</B>, which is usually command
|
||||
name completion.
|
||||
If multiple options are supplied, the <B>-D</B> option takes precedence
|
||||
over <B>-E</B>, and both take precedence over <B>-I</B>.
|
||||
If any of <B>-D</B>, <B>-E</B>, or <B>-I</B> are supplied, any other
|
||||
<I>name</I> arguments are ignored; these completions only apply to the case
|
||||
specified by the option.
|
||||
<P>
|
||||
The process of applying these completion specifications when word completion
|
||||
is attempted is described above under <B>Programmable Completion</B>.
|
||||
@@ -9995,7 +10031,7 @@ a <I>name</I> for which no specification exists, or
|
||||
an error occurs adding a completion specification.
|
||||
</DL>
|
||||
|
||||
<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DE</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
|
||||
<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DEI</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
|
||||
Modify completion options for each <I>name</I> according to the
|
||||
<I>option</I>s, or for the
|
||||
currently-executing completion if no <I>name</I>s are supplied.
|
||||
@@ -10003,12 +10039,16 @@ If no <I>option</I>s are given, display the completion options for each
|
||||
<I>name</I> or the current completion.
|
||||
The possible values of <I>option</I> are those valid for the <B>complete</B>
|
||||
builtin described above.
|
||||
The <B>-D</B> option indicates that the remaining options should
|
||||
The <B>-D</B> option indicates that other supplied options should
|
||||
apply to the ``default'' command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The <B>-E</B> option indicates that the remaining options should
|
||||
The <B>-E</B> option indicates that other supplied options should
|
||||
apply to ``empty'' command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
The <B>-I</B> option indicates that other supplied options should
|
||||
apply to completion on the inital non-assignment word on the line,
|
||||
or after a command delimiter such as <B>;</B> or <B>|</B>, which is usually
|
||||
command name completion.
|
||||
<P>
|
||||
The return value is true unless an invalid option is supplied, an attempt
|
||||
is made to modify the options for a <I>name</I> for which no completion
|
||||
@@ -11727,7 +11767,7 @@ Without options, the name and value of each shell variable are displayed
|
||||
in a format that can be reused as input
|
||||
for setting or resetting the currently-set variables.
|
||||
Read-only variables cannot be reset.
|
||||
In <I>posix</I> mode, only shell variables are listed.
|
||||
In <I>posix mode</I>, only shell variables are listed.
|
||||
The output is sorted according to the current locale.
|
||||
When options are specified, they set or unset shell attributes.
|
||||
Any arguments remaining after option processing are treated
|
||||
@@ -12444,7 +12484,7 @@ interrupt; previous versions continue with the next command in the list.
|
||||
If set,
|
||||
<B>bash</B>,
|
||||
|
||||
when in <I>posix</I> mode, treats a single quote in a double-quoted
|
||||
when in <I>posix mode</I>, treats a single quote in a double-quoted
|
||||
parameter expansion as a special character. The single quotes must match
|
||||
(an even number) and the characters between the single quotes are considered
|
||||
quoted. This is the behavior of posix mode through version 4.1.
|
||||
@@ -13426,7 +13466,7 @@ and
|
||||
<B>-u</B>,
|
||||
|
||||
which are unscaled values;
|
||||
and, when in Posix mode,
|
||||
and, when in posix mode,
|
||||
<B>-c</B>
|
||||
|
||||
and
|
||||
@@ -13852,7 +13892,7 @@ There may be only one active coprocess at a time.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2018 March 15<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2018 August 7<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -13958,6 +13998,6 @@ There may be only one active coprocess at a time.
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 19 March 2018 09:43:32 EDT
|
||||
Time: 07 September 2018 16:15:28 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+419
-359
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+3450
-3396
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+119
-51
@@ -1,9 +1,9 @@
|
||||
<!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 5.0, 15 March 2018).
|
||||
the Bash shell (version 5.0, 7 August 2018).
|
||||
|
||||
This is Edition 5.0, last updated 15 March 2018,
|
||||
This is Edition 5.0, last updated 7 August 2018,
|
||||
of The GNU Bash Reference Manual,
|
||||
for Bash, Version 5.0.
|
||||
|
||||
@@ -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 5.0, 15 March 2018).
|
||||
the Bash shell (version 5.0, 7 August 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 5.0, last updated 15 March 2018,
|
||||
<p>This is Edition 5.0, last updated 7 August 2018,
|
||||
of <cite>The GNU Bash Reference Manual</cite>,
|
||||
for <code>Bash</code>, Version 5.0.
|
||||
</p>
|
||||
@@ -1297,7 +1297,9 @@ zero if no condition tested true.
|
||||
<p>The syntax of the <code>case</code> command is:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">case <var>word</var> in [ [(] <var>pattern</var> [| <var>pattern</var>]…) <var>command-list</var> ;;]… esac
|
||||
<pre class="example">case <var>word</var> in
|
||||
[ [(] <var>pattern</var> [| <var>pattern</var>]…) <var>command-list</var> ;;]…
|
||||
esac
|
||||
</pre></div>
|
||||
|
||||
<p><code>case</code> will selectively execute the <var>command-list</var> corresponding to
|
||||
@@ -1443,14 +1445,15 @@ If the <code>nocasematch</code> shell option
|
||||
is enabled, the match is performed without regard to the case
|
||||
of alphabetic characters.
|
||||
The return value is 0 if the string matches (‘<samp>==</samp>’) or does not
|
||||
match (‘<samp>!=</samp>’)the pattern, and 1 otherwise.
|
||||
match (‘<samp>!=</samp>’) the pattern, and 1 otherwise.
|
||||
Any part of the pattern may be quoted to force the quoted portion
|
||||
to be matched as a string.
|
||||
</p>
|
||||
<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
|
||||
@@ -1722,7 +1725,8 @@ from a file (in this case, filenames listed one per line):
|
||||
|
||||
<p>with a more compact syntax reminiscent of lambdas:
|
||||
</p><div class="example">
|
||||
<pre class="example">cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" | process-output
|
||||
<pre class="example">cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" |
|
||||
process-output
|
||||
</pre></div>
|
||||
|
||||
<p>Parallel provides a built-in mechanism to remove filename extensions, which
|
||||
@@ -1744,12 +1748,20 @@ written as
|
||||
<p>If a command generates output, you may want to preserve the input order in
|
||||
the output. For instance, the following command
|
||||
</p><div class="example">
|
||||
<pre class="example">{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel traceroute
|
||||
<pre class="example">{
|
||||
echo foss.org.my ;
|
||||
echo debian.org ;
|
||||
echo freenetproject.org ;
|
||||
} | parallel traceroute
|
||||
</pre></div>
|
||||
<p>will display as output the traceroute invocation that finishes first.
|
||||
Adding the <samp>-k</samp> option
|
||||
</p><div class="example">
|
||||
<pre class="example">{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel -k traceroute
|
||||
<pre class="example">{
|
||||
echo foss.org.my ;
|
||||
echo debian.org ;
|
||||
echo freenetproject.org ;
|
||||
} | parallel -k traceroute
|
||||
</pre></div>
|
||||
<p>will ensure that the output of <code>traceroute foss.org.my</code> is displayed first.
|
||||
</p>
|
||||
@@ -2126,8 +2138,16 @@ separators.
|
||||
<a name="index-_0040"></a>
|
||||
</dt>
|
||||
<dd><a name="index-_0024_0040"></a>
|
||||
<p>($@) Expands to the positional parameters, starting from one. When the
|
||||
expansion occurs within double quotes, each parameter expands to a
|
||||
<p>($@) Expands to the positional parameters, starting from one.
|
||||
In contexts where word splitting is performed, this expands each
|
||||
positional parameter to a separate word; if not within double
|
||||
quotes, these words are subject to word splitting.
|
||||
In contexts where word splitting is not performed,
|
||||
this expands to a single word
|
||||
with each positional parameter separated by a space.
|
||||
When the
|
||||
expansion occurs within double quotes, and word splitting is performed,
|
||||
each parameter expands to a
|
||||
separate word. That is, <code>"$@"</code> is equivalent to
|
||||
<code>"$1" "$2" …</code>.
|
||||
If the double-quoted expansion occurs within a word, the expansion of
|
||||
@@ -2446,6 +2466,12 @@ and the shell assigns the expanded value.
|
||||
</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>Bash also performs tilde expansion on words satisfying the conditions of
|
||||
variable assignments (see <a href="#Shell-Parameters">Shell Parameters</a>)
|
||||
when they appear as arguments to simple commands.
|
||||
Bash does not do this, except for the <var>declaration</var> commands listed
|
||||
above, when in <small>POSIX</small> mode.
|
||||
</p>
|
||||
<hr>
|
||||
<a name="Shell-Parameter-Expansion"></a>
|
||||
<div class="header">
|
||||
@@ -2480,11 +2506,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.
|
||||
@@ -5078,8 +5104,8 @@ parent.
|
||||
<dt><code>mapfile</code></dt>
|
||||
<dd><a name="index-mapfile"></a>
|
||||
<div class="example">
|
||||
<pre class="example">mapfile [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>] [-t] [-u <var>fd</var>]
|
||||
[-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
|
||||
<pre class="example">mapfile [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>]
|
||||
[-t] [-u <var>fd</var>] [-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
|
||||
</pre></div>
|
||||
|
||||
<p>Read lines from the standard input into the indexed array variable <var>array</var>,
|
||||
@@ -5309,8 +5335,8 @@ The exit status is greater than 128 if the timeout is exceeded.
|
||||
<dt><code>readarray</code></dt>
|
||||
<dd><a name="index-readarray"></a>
|
||||
<div class="example">
|
||||
<pre class="example">readarray [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>] [-t] [-u <var>fd</var>]
|
||||
[-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
|
||||
<pre class="example">readarray [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>]
|
||||
[-t] [-u <var>fd</var>] [-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
|
||||
</pre></div>
|
||||
|
||||
<p>Read lines from the standard input into the indexed array variable <var>array</var>,
|
||||
@@ -6574,7 +6600,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>
|
||||
@@ -6590,7 +6617,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>
|
||||
@@ -7180,7 +7208,7 @@ as the sole input. If set, the value denotes the number
|
||||
of consecutive <code>EOF</code> characters that can be read as the
|
||||
first character on an input line
|
||||
before the shell will exit. If the variable exists but does not
|
||||
have a numeric value (or has no value) then the default is 10.
|
||||
have a numeric value, or has no value, then the default is 10.
|
||||
If the variable does not exist, then <code>EOF</code> signifies the end of
|
||||
input to the shell. This is only in effect for interactive shells.
|
||||
</p>
|
||||
@@ -7192,6 +7220,14 @@ input to the shell. This is only in effect for interactive shells.
|
||||
of <samp>~/.inputrc</samp>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><code>INSIDE_EMACS</code>
|
||||
<a name="index-INSIDE_005fEMACS"></a>
|
||||
</dt>
|
||||
<dd><p>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 <code>TERM</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><code>LANG</code>
|
||||
<a name="index-LANG"></a>
|
||||
</dt>
|
||||
@@ -7324,7 +7360,9 @@ as if the command
|
||||
</p><div class="example">
|
||||
<pre class="example"><code>set -o posix</code>
|
||||
</pre></div>
|
||||
<p>had been executed.
|
||||
<p>had been executed.
|
||||
When the shell enters <small>POSIX</small> mode, it sets this variable if it was
|
||||
not already set.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><code>PPID</code>
|
||||
@@ -7583,9 +7621,12 @@ Next: <a href="#Bash-Startup-Files" accesskey="n" rel="next">Bash Startup Files<
|
||||
<h3 class="section">6.1 Invoking Bash</h3>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>] [-O <var>shopt_option</var>] [<var>argument</var> …]
|
||||
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>] [-O <var>shopt_option</var>] -c <var>string</var> [<var>argument</var> …]
|
||||
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o <var>option</var>] [-O <var>shopt_option</var>] [<var>argument</var> …]
|
||||
<pre class="example">bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
|
||||
[-O <var>shopt_option</var>] [<var>argument</var> …]
|
||||
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
|
||||
[-O <var>shopt_option</var>] -c <var>string</var> [<var>argument</var> …]
|
||||
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
|
||||
[-O <var>shopt_option</var>] [<var>argument</var> …]
|
||||
</pre></div>
|
||||
|
||||
<p>All of the single-character options used with the <code>set</code> builtin
|
||||
@@ -8014,7 +8055,7 @@ when a shell with history enabled exits.
|
||||
(see <a href="#Signals">Signals</a>).
|
||||
|
||||
</li><li> In the absence of any traps, <code>SIGINT</code> is caught and handled
|
||||
((see <a href="#Signals">Signals</a>).
|
||||
(see <a href="#Signals">Signals</a>).
|
||||
<code>SIGINT</code> will interrupt some shell builtins.
|
||||
|
||||
</li><li> An interactive login shell sends a <code>SIGHUP</code> to all jobs on exit
|
||||
@@ -8843,7 +8884,7 @@ shell session.
|
||||
<p>After the string is decoded, it is expanded via
|
||||
parameter expansion, command substitution, arithmetic
|
||||
expansion, and quote removal, subject to the value of the
|
||||
<code>promptvars</code> shell option (see <a href="#Bash-Builtins">Bash Builtins</a>).
|
||||
<code>promptvars</code> shell option (see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>).
|
||||
</p>
|
||||
<hr>
|
||||
<a name="The-Restricted-Shell"></a>
|
||||
@@ -8913,7 +8954,9 @@ startup files.
|
||||
<p>The following list is what’s changed when ‘<small>POSIX</small> mode’ is in effect:
|
||||
</p>
|
||||
<ol>
|
||||
<li> When a command in the hash table no longer exists, Bash will re-search
|
||||
<li> Bash ensures that the <code>POSIXLY_CORRECT</code> variable is set.
|
||||
|
||||
</li><li> When a command in the hash table no longer exists, Bash will re-search
|
||||
<code>$PATH</code> to find the new location. This is also available with
|
||||
‘<samp>shopt -s checkhash</samp>’.
|
||||
|
||||
@@ -10004,6 +10047,7 @@ The default value is ‘<samp>off</samp>’.
|
||||
<p>If set to ‘<samp>on</samp>’, and <var>completion-ignore-case</var> is enabled, Readline
|
||||
treats hyphens (‘<samp>-</samp>’) and underscores (‘<samp>_</samp>’) as equivalent when
|
||||
performing case-insensitive filename matching and completion.
|
||||
The default value is ‘<samp>off</samp>’.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><code>completion-prefix-display-length</code></dt>
|
||||
@@ -10365,7 +10409,7 @@ Meta-Rubout: backward-kill-word
|
||||
Control-o: "> output"
|
||||
</pre></div>
|
||||
|
||||
<p>In the above example, <kbd>C-u</kbd> is bound to the function
|
||||
<p>In the example above, <kbd>C-u</kbd> is bound to the function
|
||||
<code>universal-argument</code>,
|
||||
<kbd>M-DEL</kbd> is bound to the function <code>backward-kill-word</code>, and
|
||||
<kbd>C-o</kbd> is bound to run the macro
|
||||
@@ -11068,7 +11112,7 @@ how to insert key sequences like <kbd>C-q</kbd>, for example.
|
||||
sequence sent by some terminals, and such a binding is assigned by default.
|
||||
It allows Readline to insert the pasted text as a single unit without treating
|
||||
each character as if it had been read from the keyboard. The characters
|
||||
are inserted as if each one was bound to <code>self-insert</code>) instead of
|
||||
are inserted as if each one was bound to <code>self-insert</code> instead of
|
||||
executing any editing commands.
|
||||
</p>
|
||||
</dd>
|
||||
@@ -11973,10 +12017,10 @@ matches were generated.
|
||||
<dt><code>complete</code></dt>
|
||||
<dd><a name="index-complete"></a>
|
||||
<div class="example">
|
||||
<pre class="example"><code>complete [-abcdefgjksuv] [-o <var>comp-option</var>] [-DE] [-A <var>action</var>] [-G <var>globpat</var>] [-W <var>wordlist</var>]
|
||||
[-F <var>function</var>] [-C <var>command</var>] [-X <var>filterpat</var>]
|
||||
<pre class="example"><code>complete [-abcdefgjksuv] [-o <var>comp-option</var>] [-DEI] [-A <var>action</var>] [-G <var>globpat</var>]
|
||||
[-W <var>wordlist</var>] [-F <var>function</var>] [-C <var>command</var>] [-X <var>filterpat</var>]
|
||||
[-P <var>prefix</var>] [-S <var>suffix</var>] <var>name</var> [<var>name</var> …]</code>
|
||||
<code>complete -pr [-DE] [<var>name</var> …]</code>
|
||||
<code>complete -pr [-DEI] [<var>name</var> …]</code>
|
||||
</pre></div>
|
||||
|
||||
<p>Specify how arguments to each <var>name</var> should be completed.
|
||||
@@ -11986,16 +12030,24 @@ reused as input.
|
||||
The <samp>-r</samp> option removes a completion specification for
|
||||
each <var>name</var>, or, if no <var>name</var>s are supplied, all
|
||||
completion specifications.
|
||||
The <samp>-D</samp> option indicates that the remaining options and actions should
|
||||
The <samp>-D</samp> option indicates that other supplied options and actions should
|
||||
apply to the “default” command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The <samp>-E</samp> option indicates that the remaining options and actions should
|
||||
The <samp>-E</samp> option indicates that other supplied options and actions should
|
||||
apply to “empty” command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
The <samp>-I</samp> option indicates that other supplied options and actions should
|
||||
apply to completion on the inital non-assignment word on the line, or after a
|
||||
command delimiter such as ‘<samp>;</samp>’ or ‘<samp>|</samp>’, which is usually command
|
||||
name completion.
|
||||
If multiple options are supplied, the <samp>-D</samp> option takes precedence
|
||||
over <samp>-E</samp>, and both take precedence over <samp>-I</samp>.
|
||||
If any of <samp>-D</samp>, <samp>-E</samp>, or <samp>-I</samp> are supplied, any other
|
||||
<var>name</var> arguments are ignored; these completions only apply to the case
|
||||
specified by the option.
|
||||
</p>
|
||||
<p>The process of applying these completion specifications when word completion
|
||||
is attempted is described above (see <a href="#Programmable-Completion">Programmable Completion</a>). The
|
||||
<samp>-D</samp> option takes precedence over <samp>-E</samp>.
|
||||
is attempted is described above (see <a href="#Programmable-Completion">Programmable Completion</a>).
|
||||
</p>
|
||||
<p>Other options, if specified, have the following meanings.
|
||||
The arguments to the <samp>-G</samp>, <samp>-W</samp>, and <samp>-X</samp> options
|
||||
@@ -12027,7 +12079,7 @@ no matches.
|
||||
</dd>
|
||||
<dt><code>filenames</code></dt>
|
||||
<dd><p>Tell Readline that the compspec generates filenames, so it can perform any
|
||||
filename-specific processing (like adding a slash to directory names
|
||||
filename-specific processing (like adding a slash to directory names,
|
||||
quoting special characters, or suppressing trailing spaces).
|
||||
This option is intended to be used with shell functions specified
|
||||
with <samp>-F</samp>.
|
||||
@@ -12221,7 +12273,7 @@ an error occurs adding a completion specification.
|
||||
<dt><code>compopt</code></dt>
|
||||
<dd><a name="index-compopt"></a>
|
||||
<div class="example">
|
||||
<pre class="example"><code>compopt</code> [-o <var>option</var>] [-DE] [+o <var>option</var>] [<var>name</var>]
|
||||
<pre class="example"><code>compopt</code> [-o <var>option</var>] [-DEI] [+o <var>option</var>] [<var>name</var>]
|
||||
</pre></div>
|
||||
<p>Modify completion options for each <var>name</var> according to the
|
||||
<var>option</var>s, or for the currently-executing completion if no <var>name</var>s
|
||||
@@ -12230,14 +12282,19 @@ If no <var>option</var>s are given, display the completion options for each
|
||||
<var>name</var> or the current completion.
|
||||
The possible values of <var>option</var> are those valid for the <code>complete</code>
|
||||
builtin described above.
|
||||
The <samp>-D</samp> option indicates that the remaining options should
|
||||
The <samp>-D</samp> option indicates that other supplied options should
|
||||
apply to the “default” command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The <samp>-E</samp> option indicates that the remaining options should
|
||||
The <samp>-E</samp> option indicates that other supplied options should
|
||||
apply to “empty” command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
The <samp>-I</samp> option indicates that other supplied options should
|
||||
apply to completion on the inital non-assignment word on the line, or after a
|
||||
command delimiter such as ‘<samp>;</samp>’ or ‘<samp>|</samp>’, which is usually command
|
||||
name completion.
|
||||
</p>
|
||||
<p>The <samp>-D</samp> option takes precedence over <samp>-E</samp>.
|
||||
<p>If multiple options are supplied, the <samp>-D</samp> option takes precedence
|
||||
over <samp>-E</samp>, and both take precedence over <samp>-I</samp>
|
||||
</p>
|
||||
<p>The return value is true unless an invalid option is supplied, an attempt
|
||||
is made to modify the options for a <var>name</var> for which no completion
|
||||
@@ -12291,7 +12348,7 @@ _comp_cd()
|
||||
local cur _skipdot _cdpath
|
||||
local i j k
|
||||
|
||||
# Tilde expansion, with side effect of expanding tilde to full pathname
|
||||
# Tilde expansion, which also expands tilde to full pathname
|
||||
case "$2" in
|
||||
\~*) eval cur="$2" ;;
|
||||
*) cur=$2 ;;
|
||||
@@ -12626,8 +12683,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.
|
||||
@@ -12640,8 +12697,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>
|
||||
@@ -13285,7 +13352,7 @@ compiled and linked, rather than changing run-time features.
|
||||
</p>
|
||||
<dl compact="compact">
|
||||
<dt><code>--enable-largefile</code></dt>
|
||||
<dd><p>Enable support for <a href="http://www.sas.com/standards/large_file/x_open.20Mar96.html">large files</a> if the operating system requires special compiler options
|
||||
<dd><p>Enable support for <a href="http://www.unix.org/version2/whatsnew/lfs20mar.html">large files</a> if the operating system requires special compiler options
|
||||
to build programs which can access large files. This is enabled by
|
||||
default, if the operating system provides large file support.
|
||||
</p>
|
||||
@@ -14991,6 +15058,7 @@ Next: <a href="#Function-Index" accesskey="n" rel="next">Function Index</a>, Pre
|
||||
<tr><td></td><td valign="top"><a href="#index-IGNOREEOF"><code>IGNOREEOF</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="#index-input_002dmeta"><code>input-meta</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="#index-INPUTRC"><code>INPUTRC</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="#index-INSIDE_005fEMACS"><code>INSIDE_EMACS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="#index-isearch_002dterminators"><code>isearch-terminators</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th><a name="Variable-Index_vr_letter-K">K</a></th><td></td><td></td></tr>
|
||||
|
||||
+419
-359
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+3972
-3859
File diff suppressed because it is too large
Load Diff
+64
-23
@@ -876,7 +876,9 @@ zero if no condition tested true.
|
||||
The syntax of the @code{case} command is:
|
||||
|
||||
@example
|
||||
case @var{word} in [ [(] @var{pattern} [| @var{pattern}]@dots{}) @var{command-list} ;;]@dots{} esac
|
||||
case @var{word} in
|
||||
[ [(] @var{pattern} [| @var{pattern}]@dots{}) @var{command-list} ;;]@dots{}
|
||||
esac
|
||||
@end example
|
||||
|
||||
@code{case} will selectively execute the @var{command-list} corresponding to
|
||||
@@ -1028,7 +1030,8 @@ to be matched as a string.
|
||||
An additional binary operator, @samp{=~}, is available, with the same
|
||||
precedence as @samp{==} and @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}3)).
|
||||
a @sc{POSIX} extended regular expression and matched accordingly
|
||||
(as in @i{regex}3)).
|
||||
The return value is 0 if the string matches
|
||||
the pattern, and 1 otherwise.
|
||||
If the regular expression is syntactically incorrect, the conditional
|
||||
@@ -1283,7 +1286,8 @@ from a file (in this case, filenames listed one per line):
|
||||
@noindent
|
||||
with a more compact syntax reminiscent of lambdas:
|
||||
@example
|
||||
cat list | parallel "do-something1 @{@} config-@{@} ; do-something2 < @{@}" | process-output
|
||||
cat list | parallel "do-something1 @{@} config-@{@} ; do-something2 < @{@}" |
|
||||
process-output
|
||||
@end example
|
||||
|
||||
Parallel provides a built-in mechanism to remove filename extensions, which
|
||||
@@ -1306,13 +1310,21 @@ parallel "zcat @{@} | bzip2 >@{.@}.bz2 && rm @{@}" ::: *.gz
|
||||
If a command generates output, you may want to preserve the input order in
|
||||
the output. For instance, the following command
|
||||
@example
|
||||
@{ echo foss.org.my ; echo debian.org; echo freenetproject.org; @} | parallel traceroute
|
||||
@{
|
||||
echo foss.org.my ;
|
||||
echo debian.org ;
|
||||
echo freenetproject.org ;
|
||||
@} | parallel traceroute
|
||||
@end example
|
||||
@noindent
|
||||
will display as output the traceroute invocation that finishes first.
|
||||
Adding the @option{-k} option
|
||||
@example
|
||||
@{ echo foss.org.my ; echo debian.org; echo freenetproject.org; @} | parallel -k traceroute
|
||||
@{
|
||||
echo foss.org.my ;
|
||||
echo debian.org ;
|
||||
echo freenetproject.org ;
|
||||
@} | parallel -k traceroute
|
||||
@end example
|
||||
@noindent
|
||||
will ensure that the output of @code{traceroute foss.org.my} is displayed first.
|
||||
@@ -1663,8 +1675,16 @@ separators.
|
||||
|
||||
@item @@
|
||||
@vindex $@@
|
||||
($@@) Expands to the positional parameters, starting from one. When the
|
||||
expansion occurs within double quotes, each parameter expands to a
|
||||
($@@) Expands to the positional parameters, starting from one.
|
||||
In contexts where word splitting is performed, this expands each
|
||||
positional parameter to a separate word; if not within double
|
||||
quotes, these words are subject to word splitting.
|
||||
In contexts where word splitting is not performed,
|
||||
this expands to a single word
|
||||
with each positional parameter separated by a space.
|
||||
When the
|
||||
expansion occurs within double quotes, and word splitting is performed,
|
||||
each parameter expands to a
|
||||
separate word. That is, @code{"$@@"} is equivalent to
|
||||
@code{"$1" "$2" @dots{}}.
|
||||
If the double-quoted expansion occurs within a word, the expansion of
|
||||
@@ -1926,6 +1946,12 @@ The string that would be displayed by @samp{dirs +@var{N}}
|
||||
The string that would be displayed by @samp{dirs -@var{N}}
|
||||
@end table
|
||||
|
||||
Bash also performs tilde expansion on words satisfying the conditions of
|
||||
variable assignments (@pxref{Shell Parameters})
|
||||
when they appear as arguments to simple commands.
|
||||
Bash does not do this, except for the @var{declaration} commands listed
|
||||
above, when in @sc{posix} mode.
|
||||
|
||||
@node Shell Parameter Expansion
|
||||
@subsection Shell Parameter Expansion
|
||||
@cindex parameter expansion
|
||||
@@ -1954,11 +1980,11 @@ interpreted as part of its name.
|
||||
|
||||
If the first character of @var{parameter} is an exclamation point (!),
|
||||
and @var{parameter} is not a @var{nameref},
|
||||
it introduces a level of variable indirection.
|
||||
Bash uses the value of the variable formed from the rest of
|
||||
@var{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 @var{parameter} itself.
|
||||
it introduces a level of indirection.
|
||||
Bash uses the value formed by expanding the rest of
|
||||
@var{parameter} as the new @var{parameter}; this is then
|
||||
expanded and that value is used in the rest of the expansion, rather
|
||||
than the expansion of the original @var{parameter}.
|
||||
This is known as @code{indirect expansion}.
|
||||
The value is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
@@ -4353,8 +4379,8 @@ parent.
|
||||
@item mapfile
|
||||
@btindex mapfile
|
||||
@example
|
||||
mapfile [-d @var{delim}] [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}]
|
||||
[-C @var{callback}] [-c @var{quantum}] [@var{array}]
|
||||
mapfile [-d @var{delim}] [-n @var{count}] [-O @var{origin}] [-s @var{count}]
|
||||
[-t] [-u @var{fd}] [-C @var{callback}] [-c @var{quantum}] [@var{array}]
|
||||
@end example
|
||||
|
||||
Read lines from the standard input into the indexed array variable @var{array},
|
||||
@@ -4561,8 +4587,8 @@ Read input from file descriptor @var{fd}.
|
||||
@item readarray
|
||||
@btindex readarray
|
||||
@example
|
||||
readarray [-d @var{delim}] [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}]
|
||||
[-C @var{callback}] [-c @var{quantum}] [@var{array}]
|
||||
readarray [-d @var{delim}] [-n @var{count}] [-O @var{origin}] [-s @var{count}]
|
||||
[-t] [-u @var{fd}] [-C @var{callback}] [-c @var{quantum}] [@var{array}]
|
||||
@end example
|
||||
|
||||
Read lines from the standard input into the indexed array variable @var{array},
|
||||
@@ -5617,7 +5643,8 @@ The shell sets @code{BASH_ARGC} only when in extended debugging mode
|
||||
(see @ref{The Shopt Builtin}
|
||||
for a description of the @code{extdebug} option to the @code{shopt}
|
||||
builtin).
|
||||
Setting @code{extdebug} after the shell has started to execute a script
|
||||
Setting @code{extdebug} after the shell has started to execute a script,
|
||||
or referencing this variable when @code{extdebug} is not set,
|
||||
may result in inconsistent values.
|
||||
|
||||
@item BASH_ARGV
|
||||
@@ -5630,7 +5657,8 @@ The shell sets @code{BASH_ARGV} only when in extended debugging mode
|
||||
(see @ref{The Shopt Builtin}
|
||||
for a description of the @code{extdebug} option to the @code{shopt}
|
||||
builtin).
|
||||
Setting @code{extdebug} after the shell has started to execute a script
|
||||
Setting @code{extdebug} after the shell has started to execute a script,
|
||||
or referencing this variable when @code{extdebug} is not set,
|
||||
may result in inconsistent values.
|
||||
|
||||
@item BASH_ARGV0
|
||||
@@ -6073,6 +6101,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_}.
|
||||
@@ -6156,7 +6189,9 @@ as if the command
|
||||
@code{set -o posix}
|
||||
@end example
|
||||
@noindent
|
||||
had been executed.
|
||||
had been executed.
|
||||
When the shell enters @sc{posix} mode, it sets this variable if it was
|
||||
not already set.
|
||||
|
||||
@item PPID
|
||||
The process @sc{id} of the shell's parent process. This variable
|
||||
@@ -6330,9 +6365,12 @@ This chapter describes features unique to Bash.
|
||||
@section Invoking Bash
|
||||
|
||||
@example
|
||||
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @var{option}] [-O @var{shopt_option}] [@var{argument} @dots{}]
|
||||
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @var{option}] [-O @var{shopt_option}] -c @var{string} [@var{argument} @dots{}]
|
||||
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @var{option}] [-O @var{shopt_option}] [@var{argument} @dots{}]
|
||||
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @var{option}]
|
||||
[-O @var{shopt_option}] [@var{argument} @dots{}]
|
||||
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @var{option}]
|
||||
[-O @var{shopt_option}] -c @var{string} [@var{argument} @dots{}]
|
||||
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @var{option}]
|
||||
[-O @var{shopt_option}] [@var{argument} @dots{}]
|
||||
@end example
|
||||
|
||||
All of the single-character options used with the @code{set} builtin
|
||||
@@ -7421,7 +7459,7 @@ shell session.
|
||||
After the string is decoded, it is expanded via
|
||||
parameter expansion, command substitution, arithmetic
|
||||
expansion, and quote removal, subject to the value of the
|
||||
@code{promptvars} shell option (@pxref{Bash Builtins}).
|
||||
@code{promptvars} shell option (@pxref{The Shopt Builtin}).
|
||||
|
||||
@node The Restricted Shell
|
||||
@section The Restricted Shell
|
||||
@@ -7492,6 +7530,9 @@ startup files.
|
||||
The following list is what's changed when `@sc{posix} mode' is in effect:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Bash ensures that the @env{POSIXLY_CORRECT} variable is set.
|
||||
|
||||
@item
|
||||
When a command in the hash table no longer exists, Bash will re-search
|
||||
@env{$PATH} to find the new location. This is also available with
|
||||
|
||||
+791
-780
File diff suppressed because it is too large
Load Diff
+1730
-1710
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.22.3
|
||||
%%CreationDate: Mon Mar 19 09:43:23 2018
|
||||
%%CreationDate: Fri Sep 7 15:34:15 2018
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%DocumentSuppliedResources: procset grops 1.22 3
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2018 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Mar 15 11:29:49 EDT 2018
|
||||
@set LASTCHANGE Tue Aug 7 12:01:22 EDT 2018
|
||||
|
||||
@set EDITION 5.0
|
||||
@set VERSION 5.0
|
||||
|
||||
@set UPDATED 15 March 2018
|
||||
@set UPDATED-MONTH March 2018
|
||||
@set UPDATED 7 August 2018
|
||||
@set UPDATED-MONTH August 2018
|
||||
|
||||
Reference in New Issue
Block a user