parse extended glob patterns in command substitutions in compatibility mode, even if extglob is not set

This commit is contained in:
Chet Ramey
2022-08-02 11:16:48 -04:00
parent e9e3e4fea5
commit 9c317a6ae1
74 changed files with 22157 additions and 19321 deletions
+153 -139
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.8 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.2, 3 June 2022).
Bash shell (version 5.2, 29 July 2022).
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
This is Edition 5.2, last updated 29 July 2022, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2022 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.2, 3 June 2022). The Bash home page is
Bash shell (version 5.2, 29 July 2022). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
This is Edition 5.2, last updated 29 July 2022, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
@@ -2490,6 +2490,12 @@ the following sub-patterns:
'!(PATTERN-LIST)'
Matches anything except one of the given patterns.
The 'extglob' option changes the behavior of the parser, since the
parentheses are normally treated as operators with syntactic meaning.
To ensure that extended matching patterns are parsed correctly, make
sure that 'extglob' is enabled before parsing constructs containing the
patterns, including shell functions and command substitutions.
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 '.'
@@ -7255,7 +7261,7 @@ startup files.
'read', the trap handler executes and 'read' returns an exit status
greater than 128.
60. The 'printf' builting uses 'double' (via 'strtod') to convert
60. The 'printf' builtin uses 'double' (via 'strtod') to convert
arguments corresponding to floating point conversion specifiers,
instead of 'long double' if it's available. The 'L' length
modifier forces 'printf' to use 'long double' if it's available.
@@ -7431,6 +7437,14 @@ required for bash-5.1 and later versions.
before any variable-specific transformations have been
performed (e.g., converting to lowercase). Bash-5.2 will
return the final value assigned to the variable.
* Parsing command substitutions will behave as if extended glob
(*note The Shopt Builtin::) is enabled, so that parsing a
command substitution containing an extglob pattern (say, as
part of a shell function) will not fail. This assumes the
intent is to enable extglob before the command is executed and
word expansions are performed. It will fail at word expansion
time if extglob hasn't been enabled by the time the command is
executed.

File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
@@ -7637,7 +7651,7 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
assignment. This is useful only when the '-n' option is supplied.
Supplying the '-f' option, when job control is enabled, forces
'wait' to wait for each PID or JOBSPEC to terminate before
returning its status, intead of returning when it changes status.
returning its status, instead of returning when it changes status.
If neither JOBSPEC nor PID specifies an active child process of the
shell, the return status is 127. If 'wait' is interrupted by a
signal, the return status will be greater than 128, as described
@@ -10631,7 +10645,7 @@ the Bash 'configure' recognizes.
'--with-libintl-prefix[=PREFIX]'
Define this to make Bash link with a locally-installed version of
the libintl library instead ofthe version in 'lib/intl'.
the libintl library instead of the version in 'lib/intl'.
'--with-libiconv-prefix[=PREFIX]'
Define this to make Bash look for libiconv in PREFIX instead of the
@@ -12513,138 +12527,138 @@ D.5 Concept Index

Tag Table:
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14458
Node: Single Quotes14943
Node: Double Quotes15291
Node: ANSI-C Quoting16569
Node: Locale Translation17879
Node: Creating Internationalized Scripts19190
Node: Comments23307
Node: Shell Commands23925
Node: Reserved Words24863
Node: Simple Commands25619
Node: Pipelines26273
Node: Lists29272
Node: Compound Commands31067
Node: Looping Constructs32079
Node: Conditional Constructs34574
Node: Command Grouping49062
Node: Coprocesses50540
Node: GNU Parallel53203
Node: Shell Functions54120
Node: Shell Parameters62005
Node: Positional Parameters66393
Node: Special Parameters67295
Node: Shell Expansions70509
Node: Brace Expansion72636
Node: Tilde Expansion75370
Node: Shell Parameter Expansion77991
Node: Command Substitution96342
Node: Arithmetic Expansion97697
Node: Process Substitution98665
Node: Word Splitting99785
Node: Filename Expansion101729
Node: Pattern Matching104478
Node: Quote Removal109135
Node: Redirections109430
Node: Executing Commands119090
Node: Simple Command Expansion119760
Node: Command Search and Execution121870
Node: Command Execution Environment124248
Node: Environment127283
Node: Exit Status128946
Node: Signals130730
Node: Shell Scripts134179
Node: Shell Builtin Commands137206
Node: Bourne Shell Builtins139244
Node: Bash Builtins160705
Node: Modifying Shell Behavior191561
Node: The Set Builtin191906
Node: The Shopt Builtin202507
Node: Special Builtins218419
Node: Shell Variables219398
Node: Bourne Shell Variables219835
Node: Bash Variables221939
Node: Bash Features254755
Node: Invoking Bash255768
Node: Bash Startup Files261781
Node: Interactive Shells266912
Node: What is an Interactive Shell?267322
Node: Is this Shell Interactive?267971
Node: Interactive Shell Behavior268786
Node: Bash Conditional Expressions272415
Node: Shell Arithmetic277057
Node: Aliases280001
Node: Arrays282614
Node: The Directory Stack289005
Node: Directory Stack Builtins289789
Node: Controlling the Prompt294049
Node: The Restricted Shell297014
Node: Bash POSIX Mode299624
Node: Shell Compatibility Mode311548
Node: Job Control319591
Node: Job Control Basics320051
Node: Job Control Builtins325053
Node: Job Control Variables330847
Node: Command Line Editing332003
Node: Introduction and Notation333674
Node: Readline Interaction335297
Node: Readline Bare Essentials336488
Node: Readline Movement Commands338271
Node: Readline Killing Commands339231
Node: Readline Arguments341149
Node: Searching342193
Node: Readline Init File344379
Node: Readline Init File Syntax345640
Node: Conditional Init Constructs368839
Node: Sample Init File373035
Node: Bindable Readline Commands376159
Node: Commands For Moving377363
Node: Commands For History379414
Node: Commands For Text384408
Node: Commands For Killing388057
Node: Numeric Arguments391090
Node: Commands For Completion392229
Node: Keyboard Macros396420
Node: Miscellaneous Commands397107
Node: Readline vi Mode403046
Node: Programmable Completion403953
Node: Programmable Completion Builtins411733
Node: A Programmable Completion Example422485
Node: Using History Interactively427732
Node: Bash History Facilities428416
Node: Bash History Builtins431421
Node: History Interaction436429
Node: Event Designators440049
Node: Word Designators441403
Node: Modifiers443163
Node: Installing Bash444974
Node: Basic Installation446111
Node: Compilers and Options449833
Node: Compiling For Multiple Architectures450574
Node: Installation Names452267
Node: Specifying the System Type454376
Node: Sharing Defaults455092
Node: Operation Controls455765
Node: Optional Features456723
Node: Reporting Bugs467941
Node: Major Differences From The Bourne Shell469216
Node: GNU Free Documentation License486066
Node: Indexes511243
Node: Builtin Index511697
Node: Reserved Word Index518524
Node: Variable Index520972
Node: Function Index537746
Node: Concept Index551530
Node: Top889
Node: Introduction2801
Node: What is Bash?3017
Node: What is a shell?4131
Node: Definitions6669
Node: Basic Shell Features9620
Node: Shell Syntax10839
Node: Shell Operation11865
Node: Quoting13158
Node: Escape Character14462
Node: Single Quotes14947
Node: Double Quotes15295
Node: ANSI-C Quoting16573
Node: Locale Translation17883
Node: Creating Internationalized Scripts19194
Node: Comments23311
Node: Shell Commands23929
Node: Reserved Words24867
Node: Simple Commands25623
Node: Pipelines26277
Node: Lists29276
Node: Compound Commands31071
Node: Looping Constructs32083
Node: Conditional Constructs34578
Node: Command Grouping49066
Node: Coprocesses50544
Node: GNU Parallel53207
Node: Shell Functions54124
Node: Shell Parameters62009
Node: Positional Parameters66397
Node: Special Parameters67299
Node: Shell Expansions70513
Node: Brace Expansion72640
Node: Tilde Expansion75374
Node: Shell Parameter Expansion77995
Node: Command Substitution96346
Node: Arithmetic Expansion97701
Node: Process Substitution98669
Node: Word Splitting99789
Node: Filename Expansion101733
Node: Pattern Matching104482
Node: Quote Removal109484
Node: Redirections109779
Node: Executing Commands119439
Node: Simple Command Expansion120109
Node: Command Search and Execution122219
Node: Command Execution Environment124597
Node: Environment127632
Node: Exit Status129295
Node: Signals131079
Node: Shell Scripts134528
Node: Shell Builtin Commands137555
Node: Bourne Shell Builtins139593
Node: Bash Builtins161054
Node: Modifying Shell Behavior191910
Node: The Set Builtin192255
Node: The Shopt Builtin202856
Node: Special Builtins218768
Node: Shell Variables219747
Node: Bourne Shell Variables220184
Node: Bash Variables222288
Node: Bash Features255104
Node: Invoking Bash256117
Node: Bash Startup Files262130
Node: Interactive Shells267261
Node: What is an Interactive Shell?267671
Node: Is this Shell Interactive?268320
Node: Interactive Shell Behavior269135
Node: Bash Conditional Expressions272764
Node: Shell Arithmetic277406
Node: Aliases280350
Node: Arrays282963
Node: The Directory Stack289354
Node: Directory Stack Builtins290138
Node: Controlling the Prompt294398
Node: The Restricted Shell297363
Node: Bash POSIX Mode299973
Node: Shell Compatibility Mode311896
Node: Job Control320457
Node: Job Control Basics320917
Node: Job Control Builtins325919
Node: Job Control Variables331714
Node: Command Line Editing332870
Node: Introduction and Notation334541
Node: Readline Interaction336164
Node: Readline Bare Essentials337355
Node: Readline Movement Commands339138
Node: Readline Killing Commands340098
Node: Readline Arguments342016
Node: Searching343060
Node: Readline Init File345246
Node: Readline Init File Syntax346507
Node: Conditional Init Constructs369706
Node: Sample Init File373902
Node: Bindable Readline Commands377026
Node: Commands For Moving378230
Node: Commands For History380281
Node: Commands For Text385275
Node: Commands For Killing388924
Node: Numeric Arguments391957
Node: Commands For Completion393096
Node: Keyboard Macros397287
Node: Miscellaneous Commands397974
Node: Readline vi Mode403913
Node: Programmable Completion404820
Node: Programmable Completion Builtins412600
Node: A Programmable Completion Example423352
Node: Using History Interactively428599
Node: Bash History Facilities429283
Node: Bash History Builtins432288
Node: History Interaction437296
Node: Event Designators440916
Node: Word Designators442270
Node: Modifiers444030
Node: Installing Bash445841
Node: Basic Installation446978
Node: Compilers and Options450700
Node: Compiling For Multiple Architectures451441
Node: Installation Names453134
Node: Specifying the System Type455243
Node: Sharing Defaults455959
Node: Operation Controls456632
Node: Optional Features457590
Node: Reporting Bugs468809
Node: Major Differences From The Bourne Shell470084
Node: GNU Free Documentation License486934
Node: Indexes512111
Node: Builtin Index512565
Node: Reserved Word Index519392
Node: Variable Index521840
Node: Function Index538614
Node: Concept Index552398

End Tag Table