suppresses that message if -l is supplied
compat51 (set using BASH_COMPAT)
+ - The `unset' builtin will unset the array a given an argument like
+ `a[@]'. Bash-5.2 will unset an element with key `@' (associative
+ arrays) or remove all the elements without unsetting the array
+ (indexed arrays)
+ - arithmetic commands ( ((...)) ) and the expressions in an arithmetic
+ for statement can be expanded more than once
+ - expressions used as arguments to arithmetic operators in the [[
+ conditional command can be expanded more than once
+ - the expressions in substring parameter brace expansion can be
+ expanded more than once
+ - the expressions in the $(( ... )) word expansion can be expanded
+ more than once
+ - arithmetic expressions used as indexed array subscripts can be
+ expanded more than once;
+ - `test -v', when given an argument of A[@], where A is an existing
+ associative array, will return true if the array has any set
+ elements. Bash-5.2 will look for a key named `@';
+ - the ${param[:]=value} word expansion will return VALUE, 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, as POSIX specifies
-------------------------------------------------------------------------------
doc/bashref.texi
- --enable-translatable-strings: document new configuration option
+
+ 12/2
+ ----
+subst.c
+ - verify_substring_values: now that the default compatibility level is
+ 52, and the Q_ARITH code is enabled, make the EXP_EXPANDED flag for
+ evalexp() dependent on the compatibility level
+ - param_expand: arithmetic substitution: make EXP_EXPANDED flag
+ for evalexp() dependent on the compatibility level
+ - expand_word_internal: don't call expand_array_subscript if the
+ shell compatibility level is 51 or below (Q_ARITH)
+
+test.c
+ - test_unop: if the shell compatibility level is > 51, using [@] with
+ an existing associative array will report on a key of `@'
+
+arrayfunc.c
+ - array_expand_index: if the compatibility level is > 51, Q_ARITH is
+ used and we don't pass EXP_EXPANDED to evalexp()
+
+COMPAT,doc/bashref.texi
+ - shell compatibility mode: document effects of setting the
+ compatibility mode to 51
+
+ 12/3
+ ----
+lib/malloc/malloc.c
+ - mremap: only use if MREMAP_MAYMOVE is defined, since we use the Linux
+ version of the function signature
#endif
savecmd = this_command_name;
this_command_name = (char *)NULL;
-#if 0 /* TAG:bash-5.2 */
eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED;
-#else
- eflag = 0;
-#endif
val = evalexp (t, eflag, &expok); /* XXX - was 0 but we expanded exp already */
this_command_name = savecmd;
if (t != exp)
int oa;
oa = assoc_expand_once;
- if (shell_compatibility_level > 51)
+ if (shell_compatibility_level > 51) /* XXX - internal */
{
if (uwp)
unwind_protect_int (assoc_expand_once);
char *option_name;
int mode;
{
-#if 0 /* TAG: bash-5.2, fix shell_compatibility_level test */
+#if 0 /* leave this disabled */
if (shell_compatibility_level <= 51)
#endif
assoc_expand_once = expand_once_flag;
--- /dev/null
+o The `unset' builtin will unset the array a given an argument like `a[@]'.
+ Bash-5.2 will unset an element with key `@' (associative arrays) or remove
+ all the elements without unsetting the array (indexed arrays);
+
+o arithmetic commands ( ((...)) ) and the expressions in an arithmetic for
+ statement can be expanded more than once;
+
+o expressions used as arguments to arithmetic operators in the [[ conditional
+ command can be expanded more than once;
+
+o the expressions in substring parameter brace expansion can be
+ expanded more than once;
+
+o the expressions in the $(( ... )) word expansion can be expanded
+ more than once;
+
+o arithmetic expressions used as indexed array subscripts can be
+ expanded more than once;
+
+o `test -v', when given an argument of A[@], where A is an existing
+ associative array, will return true if the array has any set elements.
+ Bash-5.2 will look for a key named `@';
+
+o the ${param[:]=value} word expansion will return VALUE, 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.
This is bash.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, 22 November 2021).
+Bash shell (version 5.2, 2 December 2021).
- This is Edition 5.2, last updated 22 November 2021, of 'The GNU Bash
+ This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2021 Free Software Foundation, Inc.
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.2, 22 November 2021). The Bash home page is
+Bash shell (version 5.2, 2 December 2021). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.2, last updated 22 November 2021, of 'The GNU Bash
+ This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
suppresses that message when the '-l' option is supplied.
'compat51 (set using BASH_COMPAT)'
- * The 'unset' builtin treats attempts to unset array subscripts
- '@' and '*' differently depending on whether the array is
- indexed or associative, and differently than in previous
- versions.
+ * The 'unset' builtin will unset the array 'a' given an argument
+ like 'a[@]'. Bash-5.2 will unset an element with key '@'
+ (associative arrays) or remove all the elements without
+ unsetting the array (indexed arrays)
+ * arithmetic commands ( ((...)) ) and the expressions in an
+ arithmetic for statement can be expanded more than once
+ * expressions used as arguments to arithmetic operators in the
+ '[[' conditional command can be expanded more than once
+ * the expressions in substring parameter brace expansion can be
+ expanded more than once
+ * the expressions in the $(( ... )) word expansion can be
+ expanded more than once
+ * arithmetic expressions used as indexed array subscripts can be
+ expanded more than once
+ * 'test -v', when given an argument of 'A[@]', where A is an
+ existing associative array, will return true if the array has
+ any set elements. Bash-5.2 will look for and report on a key
+ named '@'
+ * the ${PARAMETER[:]=VALUE} word expansion will return VALUE,
+ 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.
\1f
File: bash.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
'--enable-strict-posix-default'
Make Bash POSIX-conformant by default (*note Bash POSIX Mode::).
+'--enable-translatable-strings'
+ Enable support for '$"STRING"' translatable strings (*note Locale
+ Translation::).
+
'--enable-usg-echo-default'
A synonym for '--enable-xpg-echo-default'.
\1f
Tag Table:
-Node: Top\7f894
-Node: Introduction\7f2811
-Node: What is Bash?\7f3024
-Node: What is a shell?\7f4135
-Node: Definitions\7f6670
-Node: Basic Shell Features\7f9618
-Node: Shell Syntax\7f10834
-Node: Shell Operation\7f11857
-Node: Quoting\7f13147
-Node: Escape Character\7f14448
-Node: Single Quotes\7f14930
-Node: Double Quotes\7f15275
-Node: ANSI-C Quoting\7f16550
-Node: Locale Translation\7f17857
-Node: Creating Internationalized Scripts\7f19165
-Node: Comments\7f23279
-Node: Shell Commands\7f23894
-Node: Reserved Words\7f24829
-Node: Simple Commands\7f25582
-Node: Pipelines\7f26233
-Node: Lists\7f29189
-Node: Compound Commands\7f30981
-Node: Looping Constructs\7f31990
-Node: Conditional Constructs\7f34482
-Node: Command Grouping\7f48823
-Node: Coprocesses\7f50298
-Node: GNU Parallel\7f52958
-Node: Shell Functions\7f53872
-Node: Shell Parameters\7f61160
-Node: Positional Parameters\7f65545
-Node: Special Parameters\7f66444
-Node: Shell Expansions\7f69655
-Node: Brace Expansion\7f71779
-Node: Tilde Expansion\7f74510
-Node: Shell Parameter Expansion\7f77128
-Node: Command Substitution\7f94991
-Node: Arithmetic Expansion\7f96343
-Node: Process Substitution\7f97308
-Node: Word Splitting\7f98425
-Node: Filename Expansion\7f100366
-Node: Pattern Matching\7f102963
-Node: Quote Removal\7f107568
-Node: Redirections\7f107860
-Node: Executing Commands\7f117517
-Node: Simple Command Expansion\7f118184
-Node: Command Search and Execution\7f120291
-Node: Command Execution Environment\7f122666
-Node: Environment\7f125698
-Node: Exit Status\7f127358
-Node: Signals\7f129139
-Node: Shell Scripts\7f132585
-Node: Shell Builtin Commands\7f135609
-Node: Bourne Shell Builtins\7f137644
-Node: Bash Builtins\7f159102
-Node: Modifying Shell Behavior\7f189955
-Node: The Set Builtin\7f190297
-Node: The Shopt Builtin\7f200836
-Node: Special Builtins\7f216547
-Node: Shell Variables\7f217523
-Node: Bourne Shell Variables\7f217957
-Node: Bash Variables\7f220058
-Node: Bash Features\7f252870
-Node: Invoking Bash\7f253880
-Node: Bash Startup Files\7f259890
-Node: Interactive Shells\7f264990
-Node: What is an Interactive Shell?\7f265397
-Node: Is this Shell Interactive?\7f266043
-Node: Interactive Shell Behavior\7f266855
-Node: Bash Conditional Expressions\7f270481
-Node: Shell Arithmetic\7f275120
-Node: Aliases\7f278061
-Node: Arrays\7f280671
-Node: The Directory Stack\7f286915
-Node: Directory Stack Builtins\7f287696
-Node: Controlling the Prompt\7f291953
-Node: The Restricted Shell\7f294915
-Node: Bash POSIX Mode\7f297522
-Node: Shell Compatibility Mode\7f308792
-Node: Job Control\7f315708
-Node: Job Control Basics\7f316165
-Node: Job Control Builtins\7f321164
-Node: Job Control Variables\7f326561
-Node: Command Line Editing\7f327714
-Node: Introduction and Notation\7f329382
-Node: Readline Interaction\7f331002
-Node: Readline Bare Essentials\7f332190
-Node: Readline Movement Commands\7f333970
-Node: Readline Killing Commands\7f334927
-Node: Readline Arguments\7f336842
-Node: Searching\7f337883
-Node: Readline Init File\7f340066
-Node: Readline Init File Syntax\7f341324
-Node: Conditional Init Constructs\7f362809
-Node: Sample Init File\7f367002
-Node: Bindable Readline Commands\7f370123
-Node: Commands For Moving\7f371324
-Node: Commands For History\7f373372
-Node: Commands For Text\7f378363
-Node: Commands For Killing\7f382009
-Node: Numeric Arguments\7f385039
-Node: Commands For Completion\7f386175
-Node: Keyboard Macros\7f390363
-Node: Miscellaneous Commands\7f391047
-Node: Readline vi Mode\7f396983
-Node: Programmable Completion\7f397887
-Node: Programmable Completion Builtins\7f405664
-Node: A Programmable Completion Example\7f416356
-Node: Using History Interactively\7f421600
-Node: Bash History Facilities\7f422281
-Node: Bash History Builtins\7f425283
-Node: History Interaction\7f430288
-Node: Event Designators\7f433905
-Node: Word Designators\7f435256
-Node: Modifiers\7f437013
-Node: Installing Bash\7f438821
-Node: Basic Installation\7f439955
-Node: Compilers and Options\7f443674
-Node: Compiling For Multiple Architectures\7f444412
-Node: Installation Names\7f446102
-Node: Specifying the System Type\7f448208
-Node: Sharing Defaults\7f448921
-Node: Operation Controls\7f449591
-Node: Optional Features\7f450546
-Node: Reporting Bugs\7f461636
-Node: Major Differences From The Bourne Shell\7f462908
-Node: GNU Free Documentation License\7f479755
-Node: Indexes\7f504929
-Node: Builtin Index\7f505380
-Node: Reserved Word Index\7f512204
-Node: Variable Index\7f514649
-Node: Function Index\7f531138
-Node: Concept Index\7f544919
+Node: Top\7f892
+Node: Introduction\7f2807
+Node: What is Bash?\7f3020
+Node: What is a shell?\7f4131
+Node: Definitions\7f6666
+Node: Basic Shell Features\7f9614
+Node: Shell Syntax\7f10830
+Node: Shell Operation\7f11853
+Node: Quoting\7f13143
+Node: Escape Character\7f14444
+Node: Single Quotes\7f14926
+Node: Double Quotes\7f15271
+Node: ANSI-C Quoting\7f16546
+Node: Locale Translation\7f17853
+Node: Creating Internationalized Scripts\7f19161
+Node: Comments\7f23275
+Node: Shell Commands\7f23890
+Node: Reserved Words\7f24825
+Node: Simple Commands\7f25578
+Node: Pipelines\7f26229
+Node: Lists\7f29185
+Node: Compound Commands\7f30977
+Node: Looping Constructs\7f31986
+Node: Conditional Constructs\7f34478
+Node: Command Grouping\7f48819
+Node: Coprocesses\7f50294
+Node: GNU Parallel\7f52954
+Node: Shell Functions\7f53868
+Node: Shell Parameters\7f61156
+Node: Positional Parameters\7f65541
+Node: Special Parameters\7f66440
+Node: Shell Expansions\7f69651
+Node: Brace Expansion\7f71775
+Node: Tilde Expansion\7f74506
+Node: Shell Parameter Expansion\7f77124
+Node: Command Substitution\7f94987
+Node: Arithmetic Expansion\7f96339
+Node: Process Substitution\7f97304
+Node: Word Splitting\7f98421
+Node: Filename Expansion\7f100362
+Node: Pattern Matching\7f102959
+Node: Quote Removal\7f107564
+Node: Redirections\7f107856
+Node: Executing Commands\7f117513
+Node: Simple Command Expansion\7f118180
+Node: Command Search and Execution\7f120287
+Node: Command Execution Environment\7f122662
+Node: Environment\7f125694
+Node: Exit Status\7f127354
+Node: Signals\7f129135
+Node: Shell Scripts\7f132581
+Node: Shell Builtin Commands\7f135605
+Node: Bourne Shell Builtins\7f137640
+Node: Bash Builtins\7f159098
+Node: Modifying Shell Behavior\7f189951
+Node: The Set Builtin\7f190293
+Node: The Shopt Builtin\7f200832
+Node: Special Builtins\7f216543
+Node: Shell Variables\7f217519
+Node: Bourne Shell Variables\7f217953
+Node: Bash Variables\7f220054
+Node: Bash Features\7f252866
+Node: Invoking Bash\7f253876
+Node: Bash Startup Files\7f259886
+Node: Interactive Shells\7f264986
+Node: What is an Interactive Shell?\7f265393
+Node: Is this Shell Interactive?\7f266039
+Node: Interactive Shell Behavior\7f266851
+Node: Bash Conditional Expressions\7f270477
+Node: Shell Arithmetic\7f275116
+Node: Aliases\7f278057
+Node: Arrays\7f280667
+Node: The Directory Stack\7f286911
+Node: Directory Stack Builtins\7f287692
+Node: Controlling the Prompt\7f291949
+Node: The Restricted Shell\7f294911
+Node: Bash POSIX Mode\7f297518
+Node: Shell Compatibility Mode\7f308788
+Node: Job Control\7f316814
+Node: Job Control Basics\7f317271
+Node: Job Control Builtins\7f322270
+Node: Job Control Variables\7f327667
+Node: Command Line Editing\7f328820
+Node: Introduction and Notation\7f330488
+Node: Readline Interaction\7f332108
+Node: Readline Bare Essentials\7f333296
+Node: Readline Movement Commands\7f335076
+Node: Readline Killing Commands\7f336033
+Node: Readline Arguments\7f337948
+Node: Searching\7f338989
+Node: Readline Init File\7f341172
+Node: Readline Init File Syntax\7f342430
+Node: Conditional Init Constructs\7f363915
+Node: Sample Init File\7f368108
+Node: Bindable Readline Commands\7f371229
+Node: Commands For Moving\7f372430
+Node: Commands For History\7f374478
+Node: Commands For Text\7f379469
+Node: Commands For Killing\7f383115
+Node: Numeric Arguments\7f386145
+Node: Commands For Completion\7f387281
+Node: Keyboard Macros\7f391469
+Node: Miscellaneous Commands\7f392153
+Node: Readline vi Mode\7f398089
+Node: Programmable Completion\7f398993
+Node: Programmable Completion Builtins\7f406770
+Node: A Programmable Completion Example\7f417462
+Node: Using History Interactively\7f422706
+Node: Bash History Facilities\7f423387
+Node: Bash History Builtins\7f426389
+Node: History Interaction\7f431394
+Node: Event Designators\7f435011
+Node: Word Designators\7f436362
+Node: Modifiers\7f438119
+Node: Installing Bash\7f439927
+Node: Basic Installation\7f441061
+Node: Compilers and Options\7f444780
+Node: Compiling For Multiple Architectures\7f445518
+Node: Installation Names\7f447208
+Node: Specifying the System Type\7f449314
+Node: Sharing Defaults\7f450027
+Node: Operation Controls\7f450697
+Node: Optional Features\7f451652
+Node: Reporting Bugs\7f462867
+Node: Major Differences From The Bourne Shell\7f464139
+Node: GNU Free Documentation License\7f480986
+Node: Indexes\7f506160
+Node: Builtin Index\7f506611
+Node: Reserved Word Index\7f513435
+Node: Variable Index\7f515880
+Node: Function Index\7f532369
+Node: Concept Index\7f546150
\1f
End Tag Table
bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.2, 22 November 2021).
+Bash shell (version 5.2, 2 December 2021).
- This is Edition 5.2, last updated 22 November 2021, of 'The GNU Bash
+ This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2021 Free Software Foundation, Inc.
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.2, 22 November 2021). The Bash home page is
+Bash shell (version 5.2, 2 December 2021). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.2, last updated 22 November 2021, of 'The GNU Bash
+ This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
suppresses that message when the '-l' option is supplied.
'compat51 (set using BASH_COMPAT)'
- * The 'unset' builtin treats attempts to unset array subscripts
- '@' and '*' differently depending on whether the array is
- indexed or associative, and differently than in previous
- versions.
+ * The 'unset' builtin will unset the array 'a' given an argument
+ like 'a[@]'. Bash-5.2 will unset an element with key '@'
+ (associative arrays) or remove all the elements without
+ unsetting the array (indexed arrays)
+ * arithmetic commands ( ((...)) ) and the expressions in an
+ arithmetic for statement can be expanded more than once
+ * expressions used as arguments to arithmetic operators in the
+ '[[' conditional command can be expanded more than once
+ * the expressions in substring parameter brace expansion can be
+ expanded more than once
+ * the expressions in the $(( ... )) word expansion can be
+ expanded more than once
+ * arithmetic expressions used as indexed array subscripts can be
+ expanded more than once
+ * 'test -v', when given an argument of 'A[@]', where A is an
+ existing associative array, will return true if the array has
+ any set elements. Bash-5.2 will look for and report on a key
+ named '@'
+ * the ${PARAMETER[:]=VALUE} word expansion will return VALUE,
+ 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.
\1f
File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
\1f
Tag Table:
-Node: Top\7f897
-Node: Introduction\7f2817
-Node: What is Bash?\7f3033
-Node: What is a shell?\7f4147
-Node: Definitions\7f6685
-Node: Basic Shell Features\7f9636
-Node: Shell Syntax\7f10855
-Node: Shell Operation\7f11881
-Node: Quoting\7f13174
-Node: Escape Character\7f14478
-Node: Single Quotes\7f14963
-Node: Double Quotes\7f15311
-Node: ANSI-C Quoting\7f16589
-Node: Locale Translation\7f17899
-Node: Creating Internationalized Scripts\7f19210
-Node: Comments\7f23327
-Node: Shell Commands\7f23945
-Node: Reserved Words\7f24883
-Node: Simple Commands\7f25639
-Node: Pipelines\7f26293
-Node: Lists\7f29252
-Node: Compound Commands\7f31047
-Node: Looping Constructs\7f32059
-Node: Conditional Constructs\7f34554
-Node: Command Grouping\7f48898
-Node: Coprocesses\7f50376
-Node: GNU Parallel\7f53039
-Node: Shell Functions\7f53956
-Node: Shell Parameters\7f61247
-Node: Positional Parameters\7f65635
-Node: Special Parameters\7f66537
-Node: Shell Expansions\7f69751
-Node: Brace Expansion\7f71878
-Node: Tilde Expansion\7f74612
-Node: Shell Parameter Expansion\7f77233
-Node: Command Substitution\7f95099
-Node: Arithmetic Expansion\7f96454
-Node: Process Substitution\7f97422
-Node: Word Splitting\7f98542
-Node: Filename Expansion\7f100486
-Node: Pattern Matching\7f103086
-Node: Quote Removal\7f107694
-Node: Redirections\7f107989
-Node: Executing Commands\7f117649
-Node: Simple Command Expansion\7f118319
-Node: Command Search and Execution\7f120429
-Node: Command Execution Environment\7f122807
-Node: Environment\7f125842
-Node: Exit Status\7f127505
-Node: Signals\7f129289
-Node: Shell Scripts\7f132738
-Node: Shell Builtin Commands\7f135765
-Node: Bourne Shell Builtins\7f137803
-Node: Bash Builtins\7f159264
-Node: Modifying Shell Behavior\7f190120
-Node: The Set Builtin\7f190465
-Node: The Shopt Builtin\7f201007
-Node: Special Builtins\7f216721
-Node: Shell Variables\7f217700
-Node: Bourne Shell Variables\7f218137
-Node: Bash Variables\7f220241
-Node: Bash Features\7f253056
-Node: Invoking Bash\7f254069
-Node: Bash Startup Files\7f260082
-Node: Interactive Shells\7f265185
-Node: What is an Interactive Shell?\7f265595
-Node: Is this Shell Interactive?\7f266244
-Node: Interactive Shell Behavior\7f267059
-Node: Bash Conditional Expressions\7f270688
-Node: Shell Arithmetic\7f275330
-Node: Aliases\7f278274
-Node: Arrays\7f280887
-Node: The Directory Stack\7f287134
-Node: Directory Stack Builtins\7f287918
-Node: Controlling the Prompt\7f292178
-Node: The Restricted Shell\7f295143
-Node: Bash POSIX Mode\7f297753
-Node: Shell Compatibility Mode\7f309026
-Node: Job Control\7f315945
-Node: Job Control Basics\7f316405
-Node: Job Control Builtins\7f321407
-Node: Job Control Variables\7f326807
-Node: Command Line Editing\7f327963
-Node: Introduction and Notation\7f329634
-Node: Readline Interaction\7f331257
-Node: Readline Bare Essentials\7f332448
-Node: Readline Movement Commands\7f334231
-Node: Readline Killing Commands\7f335191
-Node: Readline Arguments\7f337109
-Node: Searching\7f338153
-Node: Readline Init File\7f340339
-Node: Readline Init File Syntax\7f341600
-Node: Conditional Init Constructs\7f363088
-Node: Sample Init File\7f367284
-Node: Bindable Readline Commands\7f370408
-Node: Commands For Moving\7f371612
-Node: Commands For History\7f373663
-Node: Commands For Text\7f378657
-Node: Commands For Killing\7f382306
-Node: Numeric Arguments\7f385339
-Node: Commands For Completion\7f386478
-Node: Keyboard Macros\7f390669
-Node: Miscellaneous Commands\7f391356
-Node: Readline vi Mode\7f397295
-Node: Programmable Completion\7f398202
-Node: Programmable Completion Builtins\7f405982
-Node: A Programmable Completion Example\7f416677
-Node: Using History Interactively\7f421924
-Node: Bash History Facilities\7f422608
-Node: Bash History Builtins\7f425613
-Node: History Interaction\7f430621
-Node: Event Designators\7f434241
-Node: Word Designators\7f435595
-Node: Modifiers\7f437355
-Node: Installing Bash\7f439166
-Node: Basic Installation\7f440303
-Node: Compilers and Options\7f444025
-Node: Compiling For Multiple Architectures\7f444766
-Node: Installation Names\7f446459
-Node: Specifying the System Type\7f448568
-Node: Sharing Defaults\7f449284
-Node: Operation Controls\7f449957
-Node: Optional Features\7f450915
-Node: Reporting Bugs\7f462133
-Node: Major Differences From The Bourne Shell\7f463408
-Node: GNU Free Documentation License\7f480258
-Node: Indexes\7f505435
-Node: Builtin Index\7f505889
-Node: Reserved Word Index\7f512716
-Node: Variable Index\7f515164
-Node: Function Index\7f531656
-Node: Concept Index\7f545440
+Node: Top\7f895
+Node: Introduction\7f2813
+Node: What is Bash?\7f3029
+Node: What is a shell?\7f4143
+Node: Definitions\7f6681
+Node: Basic Shell Features\7f9632
+Node: Shell Syntax\7f10851
+Node: Shell Operation\7f11877
+Node: Quoting\7f13170
+Node: Escape Character\7f14474
+Node: Single Quotes\7f14959
+Node: Double Quotes\7f15307
+Node: ANSI-C Quoting\7f16585
+Node: Locale Translation\7f17895
+Node: Creating Internationalized Scripts\7f19206
+Node: Comments\7f23323
+Node: Shell Commands\7f23941
+Node: Reserved Words\7f24879
+Node: Simple Commands\7f25635
+Node: Pipelines\7f26289
+Node: Lists\7f29248
+Node: Compound Commands\7f31043
+Node: Looping Constructs\7f32055
+Node: Conditional Constructs\7f34550
+Node: Command Grouping\7f48894
+Node: Coprocesses\7f50372
+Node: GNU Parallel\7f53035
+Node: Shell Functions\7f53952
+Node: Shell Parameters\7f61243
+Node: Positional Parameters\7f65631
+Node: Special Parameters\7f66533
+Node: Shell Expansions\7f69747
+Node: Brace Expansion\7f71874
+Node: Tilde Expansion\7f74608
+Node: Shell Parameter Expansion\7f77229
+Node: Command Substitution\7f95095
+Node: Arithmetic Expansion\7f96450
+Node: Process Substitution\7f97418
+Node: Word Splitting\7f98538
+Node: Filename Expansion\7f100482
+Node: Pattern Matching\7f103082
+Node: Quote Removal\7f107690
+Node: Redirections\7f107985
+Node: Executing Commands\7f117645
+Node: Simple Command Expansion\7f118315
+Node: Command Search and Execution\7f120425
+Node: Command Execution Environment\7f122803
+Node: Environment\7f125838
+Node: Exit Status\7f127501
+Node: Signals\7f129285
+Node: Shell Scripts\7f132734
+Node: Shell Builtin Commands\7f135761
+Node: Bourne Shell Builtins\7f137799
+Node: Bash Builtins\7f159260
+Node: Modifying Shell Behavior\7f190116
+Node: The Set Builtin\7f190461
+Node: The Shopt Builtin\7f201003
+Node: Special Builtins\7f216717
+Node: Shell Variables\7f217696
+Node: Bourne Shell Variables\7f218133
+Node: Bash Variables\7f220237
+Node: Bash Features\7f253052
+Node: Invoking Bash\7f254065
+Node: Bash Startup Files\7f260078
+Node: Interactive Shells\7f265181
+Node: What is an Interactive Shell?\7f265591
+Node: Is this Shell Interactive?\7f266240
+Node: Interactive Shell Behavior\7f267055
+Node: Bash Conditional Expressions\7f270684
+Node: Shell Arithmetic\7f275326
+Node: Aliases\7f278270
+Node: Arrays\7f280883
+Node: The Directory Stack\7f287130
+Node: Directory Stack Builtins\7f287914
+Node: Controlling the Prompt\7f292174
+Node: The Restricted Shell\7f295139
+Node: Bash POSIX Mode\7f297749
+Node: Shell Compatibility Mode\7f309022
+Node: Job Control\7f317051
+Node: Job Control Basics\7f317511
+Node: Job Control Builtins\7f322513
+Node: Job Control Variables\7f327913
+Node: Command Line Editing\7f329069
+Node: Introduction and Notation\7f330740
+Node: Readline Interaction\7f332363
+Node: Readline Bare Essentials\7f333554
+Node: Readline Movement Commands\7f335337
+Node: Readline Killing Commands\7f336297
+Node: Readline Arguments\7f338215
+Node: Searching\7f339259
+Node: Readline Init File\7f341445
+Node: Readline Init File Syntax\7f342706
+Node: Conditional Init Constructs\7f364194
+Node: Sample Init File\7f368390
+Node: Bindable Readline Commands\7f371514
+Node: Commands For Moving\7f372718
+Node: Commands For History\7f374769
+Node: Commands For Text\7f379763
+Node: Commands For Killing\7f383412
+Node: Numeric Arguments\7f386445
+Node: Commands For Completion\7f387584
+Node: Keyboard Macros\7f391775
+Node: Miscellaneous Commands\7f392462
+Node: Readline vi Mode\7f398401
+Node: Programmable Completion\7f399308
+Node: Programmable Completion Builtins\7f407088
+Node: A Programmable Completion Example\7f417783
+Node: Using History Interactively\7f423030
+Node: Bash History Facilities\7f423714
+Node: Bash History Builtins\7f426719
+Node: History Interaction\7f431727
+Node: Event Designators\7f435347
+Node: Word Designators\7f436701
+Node: Modifiers\7f438461
+Node: Installing Bash\7f440272
+Node: Basic Installation\7f441409
+Node: Compilers and Options\7f445131
+Node: Compiling For Multiple Architectures\7f445872
+Node: Installation Names\7f447565
+Node: Specifying the System Type\7f449674
+Node: Sharing Defaults\7f450390
+Node: Operation Controls\7f451063
+Node: Optional Features\7f452021
+Node: Reporting Bugs\7f463239
+Node: Major Differences From The Bourne Shell\7f464514
+Node: GNU Free Documentation License\7f481364
+Node: Indexes\7f506541
+Node: Builtin Index\7f506995
+Node: Reserved Word Index\7f513822
+Node: Variable Index\7f516270
+Node: Function Index\7f532762
+Node: Concept Index\7f546546
\1f
End Tag Table
@item compat51 (set using BASH_COMPAT)
@itemize @bullet
@item
-The @code{unset} builtin treats attempts to unset array subscripts @samp{@@}
-and @samp{*} differently depending on whether the array is indexed or
-associative, and differently than in previous versions.
+The @code{unset} builtin will unset the array @code{a} given an argument like
+@samp{a[@@]}.
+Bash-5.2 will unset an element with key @samp{@@} (associative arrays)
+or remove all the elements without unsetting the array (indexed arrays)
+@item
+arithmetic commands ( ((...)) ) and the expressions in an arithmetic for
+statement can be expanded more than once
+@item
+expressions used as arguments to arithmetic operators in the @code{[[}
+conditional command can be expanded more than once
+@item
+the expressions in substring parameter brace expansion can be
+expanded more than once
+@item
+the expressions in the $(( ... )) word expansion can be expanded
+more than once
+@item
+arithmetic expressions used as indexed array subscripts can be
+expanded more than once
+@item
+@code{test -v}, when given an argument of @samp{A[@@]}, where @var{A} is
+an existing associative array, will return true if the array has any set
+elements.
+Bash-5.2 will look for and report on a key named @samp{@@}
+@item
+the $@{@var{parameter}[:]=@var{value}@} word expansion will return
+@var{value}, 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.
@end itemize
@end table
Copyright (C) 1988-2021 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Mon Nov 22 09:58:18 EST 2021
+@set LASTCHANGE Thu Dec 2 15:07:19 EST 2021
@set EDITION 5.2
@set VERSION 5.2
-@set UPDATED 22 November 2021
-@set UPDATED-MONTH November 2021
+@set UPDATED 2 December 2021
+@set UPDATED-MONTH December 2021
#ifdef _PC_SOCK_MAXBUF
{ "SOCK_MAXBUF", _PC_SOCK_MAXBUF, PATHCONF },
#endif
+#ifdef _PC_ASYNC_IO
{ "_POSIX_ASYNC_IO", _PC_ASYNC_IO, PATHCONF },
+#endif
{ "_POSIX_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED, PATHCONF },
{ "_POSIX_NO_TRUNC", _PC_NO_TRUNC, PATHCONF },
+#ifdef _PC_PRIO_IO
{ "_POSIX_PRIO_IO", _PC_PRIO_IO, PATHCONF },
+#endif
+#ifdef _PC_SYNC_IO
{ "_POSIX_SYNC_IO", _PC_SYNC_IO, PATHCONF },
+#endif
{ "_POSIX_VDISABLE", _PC_VDISABLE, PATHCONF },
{ "ARG_MAX", _SC_ARG_MAX, SYSCONF },
{ "OPEN_MAX", _SC_OPEN_MAX, SYSCONF },
{ "PAGESIZE", _SC_PAGESIZE, SYSCONF },
{ "PAGE_SIZE", _SC_PAGESIZE, SYSCONF },
+#ifdef _SC_PASS_MAX
{ "PASS_MAX", _SC_PASS_MAX, SYSCONF },
+#endif
{ "PTHREAD_DESTRUCTOR_ITERATIONS", _SC_THREAD_DESTRUCTOR_ITERATIONS, SYSCONF },
{ "PTHREAD_KEYS_MAX", _SC_THREAD_KEYS_MAX, SYSCONF },
{ "PTHREAD_STACK_MIN", _SC_THREAD_STACK_MIN, SYSCONF },
#ifdef _SC_POLL
{ "_POSIX_POLL", _SC_POLL, SYSCONF },
#endif
+#ifdef _SC_PRIORITIZED_IO
{ "_POSIX_PRIORITIZED_IO", _SC_PRIORITIZED_IO, SYSCONF },
+#endif
{ "_POSIX_PRIORITY_SCHEDULING", _SC_PRIORITY_SCHEDULING, SYSCONF },
{ "_POSIX_REALTIME_SIGNALS", _SC_REALTIME_SIGNALS, SYSCONF },
{ "_POSIX_SAVED_IDS", _SC_SAVED_IDS, SYSCONF },
#ifdef _SC_T_IOV_MAX
{ "_T_IOV_MAX", _SC_T_IOV_MAX, SYSCONF },
#endif
+#ifdef _SC_XOPEN_CRYPT
{ "_XOPEN_CRYPT", _SC_XOPEN_CRYPT, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_ENH_I18N
{ "_XOPEN_ENH_I18N", _SC_XOPEN_ENH_I18N, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_LEGACY
{ "_XOPEN_LEGACY", _SC_XOPEN_LEGACY, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_REALTIME
{ "_XOPEN_REALTIME", _SC_XOPEN_REALTIME, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_REALTIME_THREADS
{ "_XOPEN_REALTIME_THREADS", _SC_XOPEN_REALTIME_THREADS, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_SHM
{ "_XOPEN_SHM", _SC_XOPEN_SHM, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_UNIX
{ "_XOPEN_UNIX", _SC_XOPEN_UNIX, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_VERSION
{ "_XOPEN_VERSION", _SC_XOPEN_VERSION, SYSCONF },
+#endif
+#ifdef _SC_XOPEN_XCU_VERSION
{ "_XOPEN_XCU_VERSION", _SC_XOPEN_XCU_VERSION, SYSCONF },
+#endif
#ifdef _SC_XOPEN_XPG2
{ "_XOPEN_XPG2", _SC_XOPEN_XPG2, SYSCONF },
#endif
{ "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
#endif
+#ifdef _SC_ADVISORY_INFO
{ "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF },
+#endif
#ifdef _SC_BARRIERS
{ "_POSIX_BARRIERS", _SC_BARRIERS, SYSCONF },
#endif
#ifdef _SC_FILE_ATTRIBUTES
{ "_POSIX_FILE_ATTRIBUTES", _SC_FILE_ATTRIBUTES, SYSCONF },
#endif
+#ifdef _SC_FILE_LOCKING
{ "_POSIX_FILE_LOCKING", _SC_FILE_LOCKING, SYSCONF },
+#endif
#ifdef _SC_FILE_SYSTEM
{ "_POSIX_FILE_SYSTEM", _SC_FILE_SYSTEM, SYSCONF },
#endif
{ "_POSIX_SIGNALS", _SC_SIGNALS, SYSCONF },
#endif
{ "_POSIX_SPAWN", _SC_SPAWN, SYSCONF },
+#ifdef _SC_SPORADIC_SERVER
{ "_POSIX_SPORADIC_SERVER", _SC_SPORADIC_SERVER, SYSCONF },
+#endif
+#ifdef _SC_THREAD_SPORADIC_SERVER
{ "_POSIX_THREAD_SPORADIC_SERVER", _SC_THREAD_SPORADIC_SERVER, SYSCONF },
+#endif
#ifdef _SC_SYSTEM_DATABASE
{ "_POSIX_SYSTEM_DATABASE", _SC_SYSTEM_DATABASE, SYSCONF },
#endif
#ifdef _SC_SYSTEM_DATABASE_R
{ "_POSIX_SYSTEM_DATABASE_R", _SC_SYSTEM_DATABASE_R, SYSCONF },
#endif
+#ifdef _SC_TIMEOUTS
{ "_POSIX_TIMEOUTS", _SC_TIMEOUTS, SYSCONF },
+#endif
+#ifdef _SC_TYPED_MEMORY_OBJECTS
{ "_POSIX_TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS, SYSCONF },
+#endif
#ifdef _SC_USER_GROUPS
{ "_POSIX_USER_GROUPS", _SC_USER_GROUPS, SYSCONF },
#endif
{ "STREAM_MAX", _SC_STREAM_MAX, SYSCONF },
{ "AIO_LISTIO_MAX", _SC_AIO_LISTIO_MAX, SYSCONF },
{ "AIO_MAX", _SC_AIO_MAX, SYSCONF },
+#ifdef _SC_AIO_PRIO_DELTA_MAX
{ "AIO_PRIO_DELTA_MAX", _SC_AIO_PRIO_DELTA_MAX, SYSCONF },
+#endif
{ "DELAYTIMER_MAX", _SC_DELAYTIMER_MAX, SYSCONF },
{ "HOST_NAME_MAX", _SC_HOST_NAME_MAX, SYSCONF },
{ "LOGIN_NAME_MAX", _SC_LOGIN_NAME_MAX, SYSCONF },
#ifdef _SC_DEVICE_IO
{ "_POSIX_DEVICE_IO", _SC_DEVICE_IO, SYSCONF },
#endif
+#ifdef _SC_TRACE
{ "_POSIX_TRACE", _SC_TRACE, SYSCONF },
+#endif
+#ifdef _SC_TRACE_EVENT_FILTER
{ "_POSIX_TRACE_EVENT_FILTER", _SC_TRACE_EVENT_FILTER, SYSCONF },
+#endif
+#ifdef _SC_TRACE_INHERIT
{ "_POSIX_TRACE_INHERIT", _SC_TRACE_INHERIT, SYSCONF },
+#endif
+#ifdef _SC_TRACE_LOG
{ "_POSIX_TRACE_LOG", _SC_TRACE_LOG, SYSCONF },
+#endif
{ "RTSIG_MAX", _SC_RTSIG_MAX, SYSCONF },
+#ifdef _SC_SEM_NSEMS_MAX
{ "SEM_NSEMS_MAX", _SC_SEM_NSEMS_MAX, SYSCONF },
+#endif
+#ifdef _SC_SEM_VALUE_MAX
{ "SEM_VALUE_MAX", _SC_SEM_VALUE_MAX, SYSCONF },
+#endif
{ "SIGQUEUE_MAX", _SC_SIGQUEUE_MAX, SYSCONF },
{ "FILESIZEBITS", _PC_FILESIZEBITS, PATHCONF },
+#ifdef _PC_ALLOC_SIZE_MIN
{ "POSIX_ALLOC_SIZE_MIN", _PC_ALLOC_SIZE_MIN, PATHCONF },
+#endif
+#ifdef _PC_REC_INCR_XFER_SIZE
{ "POSIX_REC_INCR_XFER_SIZE", _PC_REC_INCR_XFER_SIZE, PATHCONF },
+#endif
+#ifdef _PC_REC_MAX_XFER_SIZE
{ "POSIX_REC_MAX_XFER_SIZE", _PC_REC_MAX_XFER_SIZE, PATHCONF },
+#endif
+#ifdef _PC_REC_MIN_XFER_SIZE
{ "POSIX_REC_MIN_XFER_SIZE", _PC_REC_MIN_XFER_SIZE, PATHCONF },
+#endif
+#ifdef _PC_REC_XFER_ALIGN
{ "POSIX_REC_XFER_ALIGN", _PC_REC_XFER_ALIGN, PATHCONF },
+#endif
{ "SYMLINK_MAX", _PC_SYMLINK_MAX, PATHCONF },
+#ifdef _PC_2_SYMLINKS
{ "POSIX2_SYMLINKS", _PC_2_SYMLINKS, PATHCONF },
+#endif
#ifdef _SC_LEVEL1_ICACHE_SIZE
{ "LEVEL1_ICACHE_SIZE", _SC_LEVEL1_ICACHE_SIZE, SYSCONF },
{ "LEVEL4_CACHE_LINESIZE", _SC_LEVEL4_CACHE_LINESIZE, SYSCONF },
#endif
+#ifdef _SC_IPV6
{ "IPV6", _SC_IPV6, SYSCONF },
- { "RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF },
-
{ "_POSIX_IPV6", _SC_IPV6, SYSCONF },
+#endif
+#ifdef _SC_RAW_SOCKETS
+ { "RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF },
{ "_POSIX_RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF },
+#endif
{ NULL, 0, SYSCONF }
};
# define MMAP_THRESHOLD (8 * SIZEOF_LONG)
#endif
+/* We don't try to decipher the differences between the Linux-style and
+ BSD-style implementations of mremap here; we use the Linux one. */
+#if USE_MMAP == 1 && defined (HAVE_MREMAP) && defined (MREMAP_MAYMOVE)
+# define USE_MREMAP 1
+#endif
+
/* usable bins from STARTBUCK..NBUCKETS-1 */
#define NBUCKETS 28
#endif
}
-#if USE_MMAP == 1 && defined (HAVE_MREMAP)
+#if USE_MREMAP == 1
/* Assume the caller (internal_realloc) has already performed the sanity and
overflow tests. Basically we kill the old guard information, determine the
new size, call mremap with the new size, and add the bookkeeping and guard
_mstats.nrcopy++;
#endif
+#if USE_MREMAP == 1
/* If we are using mmap and have mremap, we use it here. Make sure that
the old size and new size are above the threshold where we use mmap */
-#if USE_MMAP == 1 && defined (HAVE_MREMAP)
if (nbytes > p->mh_nbytes)
newunits = nunits;
else
return 0;
}
else
-#endif
+#endif /* USE_MREMAP */
{
if ((m = internal_malloc (n, file, line, MALLOC_INTERNAL|MALLOC_NOTRACE|MALLOC_NOREG)) == 0)
return 0;
t = (char *)0;
temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES|Q_ARITH);
-#if 0 /* TAG: bash-5.2 */
eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED;
-#else
- eflag = 0;
-#endif
*e1p = evalexp (temp1, eflag, &expok);
free (temp1);
/* No error messages. */
savecmd = this_command_name;
this_command_name = (char *)NULL;
-#if 0 /* TAG: bash-5.2 */
+
eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED;
-#else
- eflag = 0;
-#endif
number = evalexp (temp1, eflag, &expok);
this_command_name = savecmd;
free (temp);
#if defined (ARRAY_VARS)
case '[': /*]*/
-#if 0 /* TAG:bash-5.2 */
if ((quoted & Q_ARITH) == 0 || shell_compatibility_level <= 51)
-#else
- if ((quoted & Q_ARITH) == 0)
-#endif
{
if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0)
goto add_ifs_character;
;;
# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
-linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*freebsd*|dragonfly*)
+linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*)
SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
/* XXX - TAG:bash-5.2 fix with corresponding fix to execute_cmd.c:
execute_cond_node() that passes TEST_ARRAYEXP in FLAGS */
-#if 0
- /* TAG:bash-5.2 */
if (shell_compatibility_level > 51)
-#endif
/* Allow associative arrays to use `test -v array[@]' to look for
a key named `@'. */
aflags |= AV_ATSTARKEYS;