mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
commit bash-20190621 snapshot
This commit is contained in:
+41
-31
@@ -1932,27 +1932,29 @@ EEXXPPAANNSSIIOONN
|
||||
|
||||
PPaatthhnnaammee EExxppaannssiioonn
|
||||
After word splitting, unless the --ff option has been set, bbaasshh scans
|
||||
each word for the characters **, ??, and [[. If one of these characters
|
||||
appears, then the word is regarded as a _p_a_t_t_e_r_n, and replaced with an
|
||||
alphabetically sorted list of filenames matching the pattern (see PPaatt--
|
||||
tteerrnn MMaattcchhiinngg below). If no matching filenames are found, and the
|
||||
shell option nnuullllgglloobb is not enabled, the word is left unchanged. If
|
||||
the nnuullllgglloobb option is set, and no matches are found, the word is
|
||||
removed. If the ffaaiillgglloobb shell option is set, and no matches are
|
||||
found, an error message is printed and the command is not executed. If
|
||||
the shell option nnooccaasseegglloobb is enabled, the match is performed without
|
||||
regard to the case of alphabetic characters. When a pattern is used
|
||||
for pathname expansion, the character ````..'''' at the start of a name or
|
||||
immediately following a slash must be matched explicitly, unless the
|
||||
shell option ddoottgglloobb is set. The filenames ````..'''' and ````....'''' must
|
||||
always be matched explicitly, even if ddoottgglloobb is set. In other cases,
|
||||
the ````..'''' character is not treated specially. When matching a path-
|
||||
name, 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 PPaatttteerrnn MMaattcchhiinngg.
|
||||
See the description of sshhoopptt below under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS for a
|
||||
description of the nnooccaasseegglloobb, nnuullllgglloobb, ffaaiillgglloobb, and ddoottgglloobb shell
|
||||
options.
|
||||
each word for the characters **, ??, [[, and, under certain circumstances
|
||||
(e.g., when it appears in the expansion of an unquoted shell variable,
|
||||
depending on the setting of the ppoossiixxgglloobb shell option), \\. If one of
|
||||
these characters appears, then the word is regarded as a _p_a_t_t_e_r_n, and
|
||||
replaced with an alphabetically sorted list of filenames matching the
|
||||
pattern (see PPaatttteerrnn MMaattcchhiinngg below). If no matching filenames are
|
||||
found, and the shell option nnuullllgglloobb is not enabled, the word is left
|
||||
unchanged. If the nnuullllgglloobb option is set, and no matches are found,
|
||||
the word is removed. If the ffaaiillgglloobb shell option is set, and no
|
||||
matches are found, an error message is printed and the command is not
|
||||
executed. If the shell option nnooccaasseegglloobb is enabled, the match is per-
|
||||
formed without regard to the case of alphabetic characters. When a
|
||||
pattern is used for pathname expansion, the character ````..'''' at the
|
||||
start of a name or immediately following a slash must be matched
|
||||
explicitly, unless the shell option ddoottgglloobb is set. The filenames
|
||||
````..'''' and ````....'''' must always be matched explicitly, even if ddoottgglloobb
|
||||
is set. In other cases, the ````..'''' 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
|
||||
PPaatttteerrnn MMaattcchhiinngg. See the description of sshhoopptt below under SSHHEELLLL
|
||||
BBUUIILLTTIINN CCOOMMMMAANNDDSS for a description of the nnooccaasseegglloobb, nnuullllgglloobb, ffaaiill--
|
||||
gglloobb, and ddoottgglloobb shell options.
|
||||
|
||||
The GGLLOOBBIIGGNNOORREE shell variable may be used to restrict the set of file
|
||||
names matching a _p_a_t_t_e_r_n. If GGLLOOBBIIGGNNOORREE is set, each matching file
|
||||
@@ -2457,15 +2459,17 @@ AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN
|
||||
to 0. A shell variable need not have its _i_n_t_e_g_e_r attribute turned on
|
||||
to be used in an expression.
|
||||
|
||||
Constants with a leading 0 are interpreted as octal numbers. A leading
|
||||
0x or 0X denotes hexadecimal. Otherwise, numbers take the form
|
||||
[_b_a_s_e_#]n, where the optional _b_a_s_e is a decimal number between 2 and 64
|
||||
representing the arithmetic base, and _n is a number in that base. If
|
||||
_b_a_s_e_# is omitted, then base 10 is used. When specifying _n, the digits
|
||||
greater than 9 are represented by the lowercase letters, the uppercase
|
||||
letters, @, and _, in that order. If _b_a_s_e is less than or equal to 36,
|
||||
lowercase and uppercase letters may be used interchangeably to repre-
|
||||
sent numbers between 10 and 35.
|
||||
Integer constants follow the C language definition, without suffixes or
|
||||
character constants. Constants with a leading 0 are interpreted as
|
||||
octal numbers. A leading 0x or 0X denotes hexadecimal. Otherwise,
|
||||
numbers take the form [_b_a_s_e_#]n, where the optional _b_a_s_e is a decimal
|
||||
number between 2 and 64 representing the arithmetic base, and _n is a
|
||||
number in that base. If _b_a_s_e_# is omitted, then base 10 is used. When
|
||||
specifying _n, if a non-digit is required, the digits greater than 9 are
|
||||
represented by the lowercase letters, the uppercase letters, @, and _,
|
||||
in that order. If _b_a_s_e is less than or equal to 36, lowercase and
|
||||
uppercase letters may be used interchangeably to represent numbers
|
||||
between 10 and 35.
|
||||
|
||||
Operators are evaluated in order of precedence. Sub-expressions in
|
||||
parentheses are evaluated first and may override the precedence rules
|
||||
@@ -5776,6 +5780,12 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
If set, bbaasshh allows patterns which match no files (see
|
||||
PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
|
||||
rather than themselves.
|
||||
ppoossiixxgglloobb
|
||||
If set, bbaasshh makes words containing unquoted backslashes
|
||||
after expansion eligible for pathname expansion, even if
|
||||
they don't contain any other unquoted pattern charac-
|
||||
ters. This option is enabled by default, and is enabled
|
||||
when _p_o_s_i_x _m_o_d_e is enabled.
|
||||
pprrooggccoommpp
|
||||
If set, the programmable completion facilities (see PPrroo--
|
||||
ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is
|
||||
@@ -6182,4 +6192,4 @@ BBUUGGSS
|
||||
|
||||
|
||||
|
||||
GNU Bash 5.0 2019 May 20 BASH(1)
|
||||
GNU Bash 5.0 2019 June 21 BASH(1)
|
||||
|
||||
Reference in New Issue
Block a user