mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-12 22:50:49 +02:00
commit bash-20180316 snapshot
This commit is contained in:
+33
-11
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Fri Mar 2 16:07:55 EST 2018
|
||||
.\" Last Change: Thu Mar 15 11:30:03 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 2" "GNU Bash 4.4"
|
||||
.TH BASH 1 "2018 March 15" "GNU Bash 5.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -869,10 +869,10 @@ or zero if no commands were executed.
|
||||
\fBcase\fP \fIword\fP \fBin\fP [ [(] \fIpattern\fP [ \fB|\fP \fIpattern\fP ] \
|
||||
... ) \fIlist\fP ;; ] ... \fBesac\fP
|
||||
A \fBcase\fP command first expands \fIword\fP, and tries to match
|
||||
it against each \fIpattern\fP in turn, using the same matching rules
|
||||
as for pathname expansion (see
|
||||
.B Pathname Expansion
|
||||
below).
|
||||
it against each \fIpattern\fP in turn, using the matching rules
|
||||
described under
|
||||
.B Pattern Matching
|
||||
below.
|
||||
The \fIword\fP is expanded using tilde
|
||||
expansion, parameter and variable expansion, arithmetic expansion,
|
||||
command substitution, process substitution and quote removal.
|
||||
@@ -3127,7 +3127,12 @@ ${\fIparameter\fP\fB##\fP\fIword\fP}
|
||||
The
|
||||
.I word
|
||||
is expanded to produce a pattern just as in pathname
|
||||
expansion. If the pattern matches the beginning of
|
||||
expansion, and matched against the expanded value of
|
||||
.I parameter
|
||||
using the rules described under
|
||||
.B Pattern Matching
|
||||
below.
|
||||
If the pattern matches the beginning of
|
||||
the value of
|
||||
.IR parameter ,
|
||||
then the result of the expansion is the expanded value of
|
||||
@@ -3158,7 +3163,11 @@ ${\fIparameter\fP\fB%%\fP\fIword\fP}
|
||||
.PD
|
||||
\fBRemove matching suffix pattern\fP.
|
||||
The \fIword\fP is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
pathname expansion, and matched against the expanded value of
|
||||
.I parameter
|
||||
using the rules described under
|
||||
.B Pattern Matching
|
||||
below.
|
||||
If the pattern matches a trailing portion of the expanded value of
|
||||
.IR parameter ,
|
||||
then the result of the expansion is the expanded value of
|
||||
@@ -3185,9 +3194,12 @@ array in turn, and the expansion is the resultant list.
|
||||
${\fIparameter\fP\fB/\fP\fIpattern\fP\fB/\fP\fIstring\fP}
|
||||
\fBPattern substitution\fP.
|
||||
The \fIpattern\fP is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
pathname expansion,
|
||||
\fIParameter\fP is expanded and the longest match of \fIpattern\fP
|
||||
against its value is replaced with \fIstring\fP.
|
||||
The match is performed using the rules described under
|
||||
.B Pattern Matching
|
||||
below.
|
||||
If \fIpattern\fP begins with \fB/\fP, all matches of \fIpattern\fP are
|
||||
replaced with \fIstring\fP. Normally only the first match is replaced.
|
||||
If \fIpattern\fP begins with \fB#\fP, it must match at the beginning
|
||||
@@ -3533,11 +3545,15 @@ and
|
||||
must always be matched explicitly, even if
|
||||
.B dotglob
|
||||
is set.
|
||||
When matching a pathname, the slash character must always be
|
||||
matched explicitly.
|
||||
In other cases, the
|
||||
.B ``.''
|
||||
character is not treated specially.
|
||||
When matching a pathname, the slash character must always be
|
||||
matched explicitly by a slash in the pattern, but in other matching
|
||||
contexts it can be matched by a special pattern character as described
|
||||
below under
|
||||
.SM
|
||||
.BR "Pattern Matching" .
|
||||
See the description of
|
||||
.B shopt
|
||||
below under
|
||||
@@ -7814,6 +7830,12 @@ The \fIwordlist\fP is split using the characters in the
|
||||
.SM
|
||||
.B IFS
|
||||
special variable as delimiters, and each resultant word is expanded.
|
||||
Shell quoting is honored within \fIwordlist\fP,
|
||||
in order to provide a
|
||||
mechanism for the words to contain shell metacharacters or characters
|
||||
in the value of
|
||||
.SM
|
||||
.BR IFS .
|
||||
The possible completions are the members of the resultant list which
|
||||
match the word being completed.
|
||||
.TP 8
|
||||
|
||||
Reference in New Issue
Block a user