mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-20 00:50:47 +02:00
change expansion for key-value pair compound assignment to associative arrays to split all words before identifying keys and values; controlled by a new shopt option: kvpair_split, enabled by default; new `loadassoc' loadable builtin to load an associative array from a set of key-value arguments
This commit is contained in:
+183
-150
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.3 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 9 July 2026).
|
||||
Bash shell (version 5.3, 14 August 2026).
|
||||
|
||||
This is Edition 5.3, last updated 9 July 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 14 August 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, 9 July 2026). The Bash home page is
|
||||
Bash shell (version 5.3, 14 August 2026). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 9 July 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 14 August 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -5464,6 +5464,15 @@ This builtin allows you to change additional optional shell behavior.
|
||||
as in a non-interactive shell. This option is enabled by
|
||||
default.
|
||||
|
||||
‘kvpair_split’
|
||||
If set, a compound assignment to an associative array performs
|
||||
word expansions, including word splitting, on all words in the
|
||||
assignment before identifying keys and values. If it is
|
||||
unset, each word in the compound assignment list is identified
|
||||
as a key or value before performing the appropriate word
|
||||
expansions, and word splitting is not performed. This option
|
||||
is enabled by default.
|
||||
|
||||
‘lastpipe’
|
||||
If set, and job control is not active, the shell runs the last
|
||||
command of a pipeline not executed in the background in the
|
||||
@@ -7341,13 +7350,20 @@ Indexing starts at zero.
|
||||
When assigning to an associative array, the words in a compound
|
||||
assignment may be either assignment statements, for which the subscript
|
||||
is required, or a list of words that is interpreted as a sequence of
|
||||
alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These
|
||||
are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ).
|
||||
The first word in the list determines how the remaining words are
|
||||
alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). The
|
||||
first word in the list determines how the remaining words are
|
||||
interpreted; all assignments in a list must be of the same type. When
|
||||
using key/value pairs, the keys may not be missing or empty; a final
|
||||
missing value is treated like the empty string.
|
||||
|
||||
The ‘kvpair_split’ option to the ‘shopt’ builtin (see *note The Shopt
|
||||
Builtin::) determines how the words in a key/value pair assignment list
|
||||
are treated. If it is enabled, each word in the list undergoes word
|
||||
expansions, including word splitting, before the assignment identifies
|
||||
individual keys and values. If it is unset, the key/value pairs in the
|
||||
example above are treated identically to NAME=( [KEY1]=VALUE1
|
||||
[KEY2]=VALUE2 ... ) and expanded appropriately.
|
||||
|
||||
This syntax is also accepted by the ‘declare’ builtin. Individual
|
||||
array elements may be assigned to using the ‘NAME[SUBSCRIPT]=VALUE’
|
||||
syntax introduced above.
|
||||
@@ -9781,7 +9797,6 @@ File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev
|
||||
|
||||
‘non-incremental-reverse-search-history (M-p)’
|
||||
Search backward starting at the current line and moving "up"
|
||||
|
||||
through the history as necessary using a non-incremental search for
|
||||
a string supplied by the user. The search string may match
|
||||
anywhere in a history line.
|
||||
@@ -9792,6 +9807,20 @@ File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev
|
||||
a string supplied by the user. The search string may match
|
||||
anywhere in a history line.
|
||||
|
||||
‘non-incremental-reverse-search-history-again ()’
|
||||
Search backward starting at the current line and moving "up"
|
||||
through the history as necessary using a non-incremental search for
|
||||
the last non-incremental search string used. If there is no
|
||||
previous search string, this command returns an error. The search
|
||||
string may match anywhere in a history line.
|
||||
|
||||
‘non-incremental-forward-search-history-again ()’
|
||||
Search forward starting at the current line and moving "down"
|
||||
through the history as necessary using a non-incremental search for
|
||||
the last non-incremental search string used. If there is no
|
||||
previous search string, this command returns an error. The search
|
||||
string may match anywhere in a history line.
|
||||
|
||||
‘history-search-backward ()’
|
||||
Search backward through the history for the string of characters
|
||||
between the start of the current line and the point. The search
|
||||
@@ -13473,7 +13502,7 @@ D.4 Function Index
|
||||
* export-completions (): Commands For Completion.
|
||||
(line 44)
|
||||
* fetch-history (): Commands For History.
|
||||
(line 109)
|
||||
(line 122)
|
||||
* forward-backward-delete-char (): Commands For Text. (line 23)
|
||||
* forward-char (C-f): Commands For Moving. (line 14)
|
||||
* forward-search-history (C-s): Commands For History.
|
||||
@@ -13490,13 +13519,13 @@ D.4 Function Index
|
||||
* history-expand-line (M-^): Miscellaneous Commands.
|
||||
(line 142)
|
||||
* history-search-backward (): Commands For History.
|
||||
(line 54)
|
||||
(line 67)
|
||||
* history-search-forward (): Commands For History.
|
||||
(line 61)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 68)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 74)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 81)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 87)
|
||||
* insert-comment (M-#): Miscellaneous Commands.
|
||||
(line 59)
|
||||
* insert-completions (M-*): Commands For Completion.
|
||||
@@ -13521,11 +13550,15 @@ D.4 Function Index
|
||||
(line 18)
|
||||
* next-screen-line (): Commands For Moving. (line 45)
|
||||
* non-incremental-forward-search-history (M-n): Commands For History.
|
||||
(line 48)
|
||||
(line 47)
|
||||
* non-incremental-forward-search-history-again (): Commands For History.
|
||||
(line 60)
|
||||
* non-incremental-reverse-search-history (M-p): Commands For History.
|
||||
(line 41)
|
||||
* non-incremental-reverse-search-history-again (): Commands For History.
|
||||
(line 53)
|
||||
* operate-and-get-next (C-o): Commands For History.
|
||||
(line 102)
|
||||
(line 115)
|
||||
* overwrite-mode (): Commands For Text. (line 77)
|
||||
* possible-command-completions (C-x !): Commands For Completion.
|
||||
(line 111)
|
||||
@@ -13589,9 +13622,9 @@ D.4 Function Index
|
||||
* yank (C-y): Commands For Killing.
|
||||
(line 72)
|
||||
* yank-last-arg (M-. or M-_): Commands For History.
|
||||
(line 90)
|
||||
(line 103)
|
||||
* yank-nth-arg (M-C-y): Commands For History.
|
||||
(line 80)
|
||||
(line 93)
|
||||
* yank-pop (M-y): Commands For Killing.
|
||||
(line 75)
|
||||
|
||||
@@ -13772,138 +13805,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top894
|
||||
Node: Introduction2828
|
||||
Node: What is Bash?3044
|
||||
Node: What is a shell?4180
|
||||
Node: Definitions6793
|
||||
Node: Basic Shell Features10123
|
||||
Node: Shell Syntax11350
|
||||
Node: Shell Operation12380
|
||||
Node: Quoting13674
|
||||
Node: Escape Character15015
|
||||
Node: Single Quotes15553
|
||||
Node: Double Quotes15905
|
||||
Node: ANSI-C Quoting17253
|
||||
Node: Locale Translation18650
|
||||
Node: Creating Internationalized Scripts20056
|
||||
Node: Comments24257
|
||||
Node: Shell Commands25027
|
||||
Node: Reserved Words25969
|
||||
Node: Simple Commands27115
|
||||
Node: Pipelines27780
|
||||
Node: Lists31039
|
||||
Node: Compound Commands32991
|
||||
Node: Looping Constructs34003
|
||||
Node: Conditional Constructs36555
|
||||
Node: Command Grouping51870
|
||||
Node: Coprocesses53365
|
||||
Node: GNU Parallel56054
|
||||
Node: Shell Functions56975
|
||||
Node: Shell Parameters65426
|
||||
Node: Positional Parameters70330
|
||||
Node: Special Parameters71423
|
||||
Node: Shell Expansions74887
|
||||
Node: Brace Expansion77079
|
||||
Node: Tilde Expansion80418
|
||||
Node: Shell Parameter Expansion83376
|
||||
Node: Command Substitution104227
|
||||
Node: Arithmetic Expansion108081
|
||||
Node: Process Substitution109268
|
||||
Node: Word Splitting110438
|
||||
Node: Filename Expansion112885
|
||||
Node: Pattern Matching116112
|
||||
Node: Quote Removal121881
|
||||
Node: Redirections122188
|
||||
Node: Executing Commands132460
|
||||
Node: Simple Command Expansion133130
|
||||
Node: Command Search and Execution135241
|
||||
Node: Command Execution Environment137688
|
||||
Node: Environment141217
|
||||
Node: Exit Status143123
|
||||
Node: Signals145185
|
||||
Node: Shell Scripts150136
|
||||
Node: Shell Builtin Commands153443
|
||||
Node: Bourne Shell Builtins155787
|
||||
Node: Bash Builtins182509
|
||||
Node: Modifying Shell Behavior220247
|
||||
Node: The Set Builtin220592
|
||||
Node: The Shopt Builtin232627
|
||||
Node: Special Builtins249683
|
||||
Node: Shell Variables250675
|
||||
Node: Bourne Shell Variables251112
|
||||
Node: Bash Variables253623
|
||||
Node: Bash Features292910
|
||||
Node: Invoking Bash293927
|
||||
Node: Bash Startup Files301160
|
||||
Node: Interactive Shells306523
|
||||
Node: What is an Interactive Shell?306934
|
||||
Node: Is this Shell Interactive?307599
|
||||
Node: Interactive Shell Behavior308426
|
||||
Node: Bash Conditional Expressions312190
|
||||
Node: Shell Arithmetic317610
|
||||
Node: Aliases320940
|
||||
Node: Arrays324077
|
||||
Node: The Directory Stack331782
|
||||
Node: Directory Stack Builtins332582
|
||||
Node: Controlling the Prompt337030
|
||||
Node: The Restricted Shell340152
|
||||
Node: Bash POSIX Mode343248
|
||||
Node: Shell Compatibility Mode363210
|
||||
Node: Job Control372220
|
||||
Node: Job Control Basics372680
|
||||
Node: Job Control Builtins379051
|
||||
Node: Job Control Variables385842
|
||||
Node: Command Line Editing387076
|
||||
Node: Introduction and Notation388782
|
||||
Node: Readline Interaction391137
|
||||
Node: Readline Bare Essentials392328
|
||||
Node: Readline Movement Commands394139
|
||||
Node: Readline Killing Commands395138
|
||||
Node: Readline Arguments397164
|
||||
Node: Searching398257
|
||||
Node: Readline Init File400503
|
||||
Node: Readline Init File Syntax401809
|
||||
Node: Conditional Init Constructs428763
|
||||
Node: Sample Init File433151
|
||||
Node: Bindable Readline Commands436274
|
||||
Node: Commands For Moving437815
|
||||
Node: Commands For History440282
|
||||
Node: Commands For Text445678
|
||||
Node: Commands For Killing449806
|
||||
Node: Numeric Arguments452597
|
||||
Node: Commands For Completion453752
|
||||
Node: Keyboard Macros459451
|
||||
Node: Miscellaneous Commands460155
|
||||
Node: Readline vi Mode467701
|
||||
Node: Programmable Completion468681
|
||||
Node: Programmable Completion Builtins478420
|
||||
Node: A Programmable Completion Example490160
|
||||
Node: Using History Interactively495508
|
||||
Node: Bash History Facilities496192
|
||||
Node: Bash History Builtins499930
|
||||
Node: History Interaction507528
|
||||
Node: Event Designators512481
|
||||
Node: Word Designators514062
|
||||
Node: Modifiers516457
|
||||
Node: Installing Bash518397
|
||||
Node: Basic Installation519516
|
||||
Node: Compilers and Options523395
|
||||
Node: Compiling For Multiple Architectures524148
|
||||
Node: Installation Names525904
|
||||
Node: Specifying the System Type528141
|
||||
Node: Sharing Defaults528890
|
||||
Node: Operation Controls529607
|
||||
Node: Optional Features530629
|
||||
Node: Reporting Bugs543355
|
||||
Node: Major Differences From The Bourne Shell544715
|
||||
Node: GNU Free Documentation License566145
|
||||
Node: Indexes591325
|
||||
Node: Builtin Index591779
|
||||
Node: Reserved Word Index598880
|
||||
Node: Variable Index601328
|
||||
Node: Function Index618744
|
||||
Node: Concept Index632880
|
||||
Node: Top900
|
||||
Node: Introduction2840
|
||||
Node: What is Bash?3056
|
||||
Node: What is a shell?4192
|
||||
Node: Definitions6805
|
||||
Node: Basic Shell Features10135
|
||||
Node: Shell Syntax11362
|
||||
Node: Shell Operation12392
|
||||
Node: Quoting13686
|
||||
Node: Escape Character15027
|
||||
Node: Single Quotes15565
|
||||
Node: Double Quotes15917
|
||||
Node: ANSI-C Quoting17265
|
||||
Node: Locale Translation18662
|
||||
Node: Creating Internationalized Scripts20068
|
||||
Node: Comments24269
|
||||
Node: Shell Commands25039
|
||||
Node: Reserved Words25981
|
||||
Node: Simple Commands27127
|
||||
Node: Pipelines27792
|
||||
Node: Lists31051
|
||||
Node: Compound Commands33003
|
||||
Node: Looping Constructs34015
|
||||
Node: Conditional Constructs36567
|
||||
Node: Command Grouping51882
|
||||
Node: Coprocesses53377
|
||||
Node: GNU Parallel56066
|
||||
Node: Shell Functions56987
|
||||
Node: Shell Parameters65438
|
||||
Node: Positional Parameters70342
|
||||
Node: Special Parameters71435
|
||||
Node: Shell Expansions74899
|
||||
Node: Brace Expansion77091
|
||||
Node: Tilde Expansion80430
|
||||
Node: Shell Parameter Expansion83388
|
||||
Node: Command Substitution104239
|
||||
Node: Arithmetic Expansion108093
|
||||
Node: Process Substitution109280
|
||||
Node: Word Splitting110450
|
||||
Node: Filename Expansion112897
|
||||
Node: Pattern Matching116124
|
||||
Node: Quote Removal121893
|
||||
Node: Redirections122200
|
||||
Node: Executing Commands132472
|
||||
Node: Simple Command Expansion133142
|
||||
Node: Command Search and Execution135253
|
||||
Node: Command Execution Environment137700
|
||||
Node: Environment141229
|
||||
Node: Exit Status143135
|
||||
Node: Signals145197
|
||||
Node: Shell Scripts150148
|
||||
Node: Shell Builtin Commands153455
|
||||
Node: Bourne Shell Builtins155799
|
||||
Node: Bash Builtins182521
|
||||
Node: Modifying Shell Behavior220259
|
||||
Node: The Set Builtin220604
|
||||
Node: The Shopt Builtin232639
|
||||
Node: Special Builtins250178
|
||||
Node: Shell Variables251170
|
||||
Node: Bourne Shell Variables251607
|
||||
Node: Bash Variables254118
|
||||
Node: Bash Features293405
|
||||
Node: Invoking Bash294422
|
||||
Node: Bash Startup Files301655
|
||||
Node: Interactive Shells307018
|
||||
Node: What is an Interactive Shell?307429
|
||||
Node: Is this Shell Interactive?308094
|
||||
Node: Interactive Shell Behavior308921
|
||||
Node: Bash Conditional Expressions312685
|
||||
Node: Shell Arithmetic318105
|
||||
Node: Aliases321435
|
||||
Node: Arrays324572
|
||||
Node: The Directory Stack332678
|
||||
Node: Directory Stack Builtins333478
|
||||
Node: Controlling the Prompt337926
|
||||
Node: The Restricted Shell341048
|
||||
Node: Bash POSIX Mode344144
|
||||
Node: Shell Compatibility Mode364106
|
||||
Node: Job Control373116
|
||||
Node: Job Control Basics373576
|
||||
Node: Job Control Builtins379947
|
||||
Node: Job Control Variables386738
|
||||
Node: Command Line Editing387972
|
||||
Node: Introduction and Notation389678
|
||||
Node: Readline Interaction392033
|
||||
Node: Readline Bare Essentials393224
|
||||
Node: Readline Movement Commands395035
|
||||
Node: Readline Killing Commands396034
|
||||
Node: Readline Arguments398060
|
||||
Node: Searching399153
|
||||
Node: Readline Init File401399
|
||||
Node: Readline Init File Syntax402705
|
||||
Node: Conditional Init Constructs429659
|
||||
Node: Sample Init File434047
|
||||
Node: Bindable Readline Commands437170
|
||||
Node: Commands For Moving438711
|
||||
Node: Commands For History441178
|
||||
Node: Commands For Text447338
|
||||
Node: Commands For Killing451466
|
||||
Node: Numeric Arguments454257
|
||||
Node: Commands For Completion455412
|
||||
Node: Keyboard Macros461111
|
||||
Node: Miscellaneous Commands461815
|
||||
Node: Readline vi Mode469361
|
||||
Node: Programmable Completion470341
|
||||
Node: Programmable Completion Builtins480080
|
||||
Node: A Programmable Completion Example491820
|
||||
Node: Using History Interactively497168
|
||||
Node: Bash History Facilities497852
|
||||
Node: Bash History Builtins501590
|
||||
Node: History Interaction509188
|
||||
Node: Event Designators514141
|
||||
Node: Word Designators515722
|
||||
Node: Modifiers518117
|
||||
Node: Installing Bash520057
|
||||
Node: Basic Installation521176
|
||||
Node: Compilers and Options525055
|
||||
Node: Compiling For Multiple Architectures525808
|
||||
Node: Installation Names527564
|
||||
Node: Specifying the System Type529801
|
||||
Node: Sharing Defaults530550
|
||||
Node: Operation Controls531267
|
||||
Node: Optional Features532289
|
||||
Node: Reporting Bugs545015
|
||||
Node: Major Differences From The Bourne Shell546375
|
||||
Node: GNU Free Documentation License567805
|
||||
Node: Indexes592985
|
||||
Node: Builtin Index593439
|
||||
Node: Reserved Word Index600540
|
||||
Node: Variable Index602988
|
||||
Node: Function Index620404
|
||||
Node: Concept Index634832
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user