fix for heuristic to detect case statements when parsing $() command substitutions to find history expansion; fix for history not being saved if a SIGHUP arrives during $PROMPT_COMMAND execution; workaround for Cygwin bug that results in bash incorrectly calculating the system pipe size

This commit is contained in:
Chet Ramey
2026-03-09 14:54:45 -04:00
parent d0b41c2c5f
commit 1f292e433e
16 changed files with 6183 additions and 366 deletions
+161 -158
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.2 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 27 February 2026).
Bash shell (version 5.3, 3 March 2026).
This is Edition 5.3, last updated 27 February 2026, of The GNU Bash
This is Edition 5.3, last updated 3 March 2026, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Copyright © 1988-2026 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.3, 27 February 2026). The Bash home page is
Bash shell (version 5.3, 3 March 2026). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 27 February 2026, of The GNU Bash
This is Edition 5.3, last updated 3 March 2026, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -1897,16 +1897,17 @@ introduce indirection.
In each of the cases below, WORD is subject to tilde expansion,
parameter expansion, command substitution, and arithmetic expansion.
When not performing substring expansion, using the forms described
below (e.g., :), Bash tests for a parameter that is unset or null.
Omitting the colon results in a test only for a parameter that is unset.
Put another way, if the colon is included, the operator tests for both
PARAMETER's existence and that its value is not null; if the colon is
omitted, the operator tests only for existence.
When performing the first four expansions documented below (:-,
:=, :?, and :+), including the colon, Bash tests for a parameter
that is unset or null. Omitting the colon results in a test only for a
parameter that is unset. Put another way, if the colon is included, the
operator tests for both PARAMETER's existence and that its value is not
null; if the colon is omitted, the operator tests only for existence.
${PARAMETER:WORD}
If PARAMETER is unset or null, the expansion of WORD is
substituted. Otherwise, the value of PARAMETER is substituted.
If PARAMETER is unset or null, or unset if the colon is not
present, the expansion of WORD is substituted. Otherwise, the
value of PARAMETER is substituted.
$ v=123
$ echo ${v-unset}
@@ -1923,10 +1924,11 @@ omitted, the operator tests only for existence.
unset-or-null
${PARAMETER:=WORD}
If PARAMETER is unset or null, the expansion of WORD is assigned to
PARAMETER, and the result of the expansion is the final value of
PARAMETER. Positional parameters and special parameters may not be
assigned in this way.
If PARAMETER is unset or null, or unset if the colon is not
present, the expansion of WORD is assigned to PARAMETER, and the
result of the expansion is the final value of PARAMETER.
Positional parameters and special parameters may not be assigned in
this way.
$ unset var
$ : ${var=DEFAULT}
@@ -1946,12 +1948,13 @@ omitted, the operator tests only for existence.
DEFAULT
${PARAMETER:?WORD}
If PARAMETER is null or unset, the shell writes the expansion of
WORD (or a message to that effect if WORD is not present) to the
standard error and, if it is not interactive, exits with a non-zero
status. An interactive shell does not exit, but does not execute
the command associated with the expansion. Otherwise, the value of
PARAMETER is substituted.
If PARAMETER is unset or null, or unset if the colon is not
present, the shell writes the expansion of WORD (or a message to
that effect if WORD is not present) to the standard error and, if
it is not interactive, exits with a non-zero status. An
interactive shell does not exit, but does not execute the command
associated with the expansion. Otherwise, the value of PARAMETER
is substituted.
$ var=
$ : ${var:?var is unset or null}
@@ -1968,9 +1971,9 @@ omitted, the operator tests only for existence.
123
${PARAMETER:+WORD}
If PARAMETER is null or unset, nothing is substituted, otherwise
the expansion of WORD is substituted. The value of PARAMETER is
not used.
If PARAMETER is unset or null, or unset if the colon is not
present, nothing is substituted, otherwise the expansion of WORD is
substituted. The value of PARAMETER is not used.
$ var=123
$ echo ${var:+var is set and not null}
@@ -7164,7 +7167,7 @@ shell variables may also be referenced by name without using the
parameter expansion syntax. This means you can use X, where X is a
shell variable name, in an arithmetic expression, and the shell will
evaluate its value as an expression and use the result. A shell
variable that is null or unset evaluates to 0 when referenced by name in
variable that is unset or null evaluates to 0 when referenced by name in
an expression.
The value of a variable is evaluated as an arithmetic expression when
@@ -13736,138 +13739,138 @@ D.5 Concept Index

Tag Table:
Node: Top904
Node: Introduction2848
Node: What is Bash?3064
Node: What is a shell?4200
Node: Definitions6813
Node: Basic Shell Features10143
Node: Shell Syntax11370
Node: Shell Operation12400
Node: Quoting13694
Node: Escape Character15035
Node: Single Quotes15573
Node: Double Quotes15925
Node: ANSI-C Quoting17273
Node: Locale Translation18670
Node: Creating Internationalized Scripts20076
Node: Comments24277
Node: Shell Commands25047
Node: Reserved Words25989
Node: Simple Commands27135
Node: Pipelines27800
Node: Lists31059
Node: Compound Commands33011
Node: Looping Constructs34023
Node: Conditional Constructs36575
Node: Command Grouping51715
Node: Coprocesses53210
Node: GNU Parallel55899
Node: Shell Functions56820
Node: Shell Parameters65271
Node: Positional Parameters70175
Node: Special Parameters71268
Node: Shell Expansions74732
Node: Brace Expansion76924
Node: Tilde Expansion80263
Node: Shell Parameter Expansion83221
Node: Command Substitution103871
Node: Arithmetic Expansion107725
Node: Process Substitution108904
Node: Word Splitting110015
Node: Filename Expansion112462
Node: Pattern Matching115689
Node: Quote Removal121458
Node: Redirections121765
Node: Executing Commands132024
Node: Simple Command Expansion132694
Node: Command Search and Execution134805
Node: Command Execution Environment137252
Node: Environment140781
Node: Exit Status142687
Node: Signals144749
Node: Shell Scripts149700
Node: Shell Builtin Commands153001
Node: Bourne Shell Builtins155345
Node: Bash Builtins182067
Node: Modifying Shell Behavior219806
Node: The Set Builtin220151
Node: The Shopt Builtin232148
Node: Special Builtins249204
Node: Shell Variables250196
Node: Bourne Shell Variables250633
Node: Bash Variables253144
Node: Bash Features292431
Node: Invoking Bash293448
Node: Bash Startup Files300035
Node: Interactive Shells305280
Node: What is an Interactive Shell?305691
Node: Is this Shell Interactive?306356
Node: Interactive Shell Behavior307183
Node: Bash Conditional Expressions310947
Node: Shell Arithmetic316367
Node: Aliases319697
Node: Arrays322834
Node: The Directory Stack330540
Node: Directory Stack Builtins331340
Node: Controlling the Prompt335788
Node: The Restricted Shell338675
Node: Bash POSIX Mode341771
Node: Shell Compatibility Mode361590
Node: Job Control370600
Node: Job Control Basics371060
Node: Job Control Builtins377431
Node: Job Control Variables384222
Node: Command Line Editing385456
Node: Introduction and Notation387162
Node: Readline Interaction389517
Node: Readline Bare Essentials390708
Node: Readline Movement Commands392519
Node: Readline Killing Commands393518
Node: Readline Arguments395544
Node: Searching396637
Node: Readline Init File398883
Node: Readline Init File Syntax400189
Node: Conditional Init Constructs427143
Node: Sample Init File431531
Node: Bindable Readline Commands434654
Node: Commands For Moving436195
Node: Commands For History438662
Node: Commands For Text444056
Node: Commands For Killing448184
Node: Numeric Arguments450975
Node: Commands For Completion452130
Node: Keyboard Macros457829
Node: Miscellaneous Commands458533
Node: Readline vi Mode466079
Node: Programmable Completion467059
Node: Programmable Completion Builtins476798
Node: A Programmable Completion Example488538
Node: Using History Interactively493886
Node: Bash History Facilities494570
Node: Bash History Builtins498308
Node: History Interaction505906
Node: Event Designators510859
Node: Word Designators512440
Node: Modifiers514835
Node: Installing Bash516775
Node: Basic Installation517894
Node: Compilers and Options521773
Node: Compiling For Multiple Architectures522526
Node: Installation Names524282
Node: Specifying the System Type526519
Node: Sharing Defaults527268
Node: Operation Controls527985
Node: Optional Features529007
Node: Reporting Bugs541733
Node: Major Differences From The Bourne Shell543093
Node: GNU Free Documentation License564523
Node: Indexes589703
Node: Builtin Index590157
Node: Reserved Word Index597258
Node: Variable Index599706
Node: Function Index617122
Node: Concept Index631258
Node: Top896
Node: Introduction2832
Node: What is Bash?3048
Node: What is a shell?4184
Node: Definitions6797
Node: Basic Shell Features10127
Node: Shell Syntax11354
Node: Shell Operation12384
Node: Quoting13678
Node: Escape Character15019
Node: Single Quotes15557
Node: Double Quotes15909
Node: ANSI-C Quoting17257
Node: Locale Translation18654
Node: Creating Internationalized Scripts20060
Node: Comments24261
Node: Shell Commands25031
Node: Reserved Words25973
Node: Simple Commands27119
Node: Pipelines27784
Node: Lists31043
Node: Compound Commands32995
Node: Looping Constructs34007
Node: Conditional Constructs36559
Node: Command Grouping51699
Node: Coprocesses53194
Node: GNU Parallel55883
Node: Shell Functions56804
Node: Shell Parameters65255
Node: Positional Parameters70159
Node: Special Parameters71252
Node: Shell Expansions74716
Node: Brace Expansion76908
Node: Tilde Expansion80247
Node: Shell Parameter Expansion83205
Node: Command Substitution104056
Node: Arithmetic Expansion107910
Node: Process Substitution109089
Node: Word Splitting110200
Node: Filename Expansion112647
Node: Pattern Matching115874
Node: Quote Removal121643
Node: Redirections121950
Node: Executing Commands132209
Node: Simple Command Expansion132879
Node: Command Search and Execution134990
Node: Command Execution Environment137437
Node: Environment140966
Node: Exit Status142872
Node: Signals144934
Node: Shell Scripts149885
Node: Shell Builtin Commands153186
Node: Bourne Shell Builtins155530
Node: Bash Builtins182252
Node: Modifying Shell Behavior219991
Node: The Set Builtin220336
Node: The Shopt Builtin232333
Node: Special Builtins249389
Node: Shell Variables250381
Node: Bourne Shell Variables250818
Node: Bash Variables253329
Node: Bash Features292616
Node: Invoking Bash293633
Node: Bash Startup Files300220
Node: Interactive Shells305465
Node: What is an Interactive Shell?305876
Node: Is this Shell Interactive?306541
Node: Interactive Shell Behavior307368
Node: Bash Conditional Expressions311132
Node: Shell Arithmetic316552
Node: Aliases319882
Node: Arrays323019
Node: The Directory Stack330725
Node: Directory Stack Builtins331525
Node: Controlling the Prompt335973
Node: The Restricted Shell338860
Node: Bash POSIX Mode341956
Node: Shell Compatibility Mode361775
Node: Job Control370785
Node: Job Control Basics371245
Node: Job Control Builtins377616
Node: Job Control Variables384407
Node: Command Line Editing385641
Node: Introduction and Notation387347
Node: Readline Interaction389702
Node: Readline Bare Essentials390893
Node: Readline Movement Commands392704
Node: Readline Killing Commands393703
Node: Readline Arguments395729
Node: Searching396822
Node: Readline Init File399068
Node: Readline Init File Syntax400374
Node: Conditional Init Constructs427328
Node: Sample Init File431716
Node: Bindable Readline Commands434839
Node: Commands For Moving436380
Node: Commands For History438847
Node: Commands For Text444241
Node: Commands For Killing448369
Node: Numeric Arguments451160
Node: Commands For Completion452315
Node: Keyboard Macros458014
Node: Miscellaneous Commands458718
Node: Readline vi Mode466264
Node: Programmable Completion467244
Node: Programmable Completion Builtins476983
Node: A Programmable Completion Example488723
Node: Using History Interactively494071
Node: Bash History Facilities494755
Node: Bash History Builtins498493
Node: History Interaction506091
Node: Event Designators511044
Node: Word Designators512625
Node: Modifiers515020
Node: Installing Bash516960
Node: Basic Installation518079
Node: Compilers and Options521958
Node: Compiling For Multiple Architectures522711
Node: Installation Names524467
Node: Specifying the System Type526704
Node: Sharing Defaults527453
Node: Operation Controls528170
Node: Optional Features529192
Node: Reporting Bugs541918
Node: Major Differences From The Bourne Shell543278
Node: GNU Free Documentation License564708
Node: Indexes589888
Node: Builtin Index590342
Node: Reserved Word Index597443
Node: Variable Index599891
Node: Function Index617307
Node: Concept Index631443

End Tag Table