summaryrefslogtreecommitdiff
path: root/doc/bashref.info
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bashref.info')
-rw-r--r--doc/bashref.info351
1 files changed, 182 insertions, 169 deletions
diff --git a/doc/bashref.info b/doc/bashref.info
index dbd98657..0b107561 100644
--- a/doc/bashref.info
+++ b/doc/bashref.info
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.7 from
bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.1, 16 June 2021).
+Bash shell (version 5.1, 10 August 2021).
- This is Edition 5.1, last updated 16 June 2021, of 'The GNU Bash
+ This is Edition 5.1, last updated 10 August 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.1.
Copyright (C) 1988-2021 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.1, 16 June 2021). The Bash home page is
+Bash shell (version 5.1, 10 August 2021). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.1, last updated 16 June 2021, of 'The GNU Bash
+ This is Edition 5.1, last updated 10 August 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.1.
Bash contains features that appear in other popular shells, and some
@@ -485,10 +485,12 @@ current locale. The 'gettext' infrastructure performs the lookup and
translation, using the 'LC_MESSAGES', 'TEXTDOMAINDIR', and 'TEXTDOMAIN'
shell variables, as explained below. See the gettext documentation for
additional details not covered here. If the current locale is 'C' or
-'POSIX', or if there are no translations available, the dollar sign is
-ignored, and the shell doesn't attempt to translate the string. Since
-this is a form of quoting, the string always remains double-quoted,
-whether or not it is translated and replaced.
+'POSIX', if there are no translations available, of if the string is not
+translated, the dollar sign is ignored. Since this is a form of double
+quoting, the string remains double-quoted by default, whether or not it
+is translated and replaced. If the 'noexpand_translation' option is
+enabled using the 'shopt' builtin (*note The Shopt Builtin::),
+translated strings are single-quoted instead of double-quoted.
The rest of this section is a brief overview of how you use gettext
to create translations for strings in a shell script named SCRIPTNAME.
@@ -975,11 +977,11 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
(( EXPRESSION ))
The arithmetic EXPRESSION is evaluated according to the rules
- described below (*note Shell Arithmetic::). The EXPRESSION is
- expanded as if it were within double quotes, but double quote
- characters in EXPRESSION are not special and are removed. If the
- value of the expression is non-zero, the return status is 0;
- otherwise the return status is 1.
+ described below (*note Shell Arithmetic::). The EXPRESSION
+ undergoes the same expansions as if it were within double quotes,
+ but double quote characters in EXPRESSION are not treated specially
+ are removed. If the value of the expression is non-zero, the
+ return status is 0; otherwise the return status is 1.
'[[...]]'
[[ EXPRESSION ]]
@@ -991,9 +993,9 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
and filename expansion. The shell performs tilde expansion,
parameter and variable expansion, arithmetic expansion, command
substitution, process substitution, and quote removal on those
- words (as if the words were enclosed in double quotes).
- Conditional operators such as '-f' must be unquoted to be
- recognized as primaries.
+ words (the expansions that would occur if the words were enclosed
+ in double quotes). Conditional operators such as '-f' must be
+ unquoted to be recognized as primaries.
When used with '[[', the '<' and '>' operators sort
lexicographically using the current locale.
@@ -1463,8 +1465,7 @@ command substitution, arithmetic expansion, and quote removal (*note
Shell Parameter Expansion::). If the variable has its 'integer'
attribute set, then VALUE is evaluated as an arithmetic expression even
if the '$((...))' expansion is not used (*note Arithmetic Expansion::).
-Word splitting is not performed, with the exception of '"$@"' as
-explained below. Filename expansion is not performed. Assignment
+Word splitting and filename expansion are not performed. Assignment
statements may also appear as arguments to the 'alias', 'declare',
'typeset', 'export', 'readonly', and 'local' builtin commands
("declaration" commands). When in POSIX mode (*note Bash POSIX Mode::),
@@ -2171,12 +2172,12 @@ is:
$(( EXPRESSION ))
- The EXPRESSION is treated as if it were within double quotes, but a
-double quote inside the parentheses is not treated specially. All
-tokens in the expression undergo parameter and variable expansion,
-command substitution, and quote removal. The result is treated as the
-arithmetic expression to be evaluated. Arithmetic expansions may be
-nested.
+ The EXPRESSION undergoes the same expansions as if it were within
+double quotes, but double quote characters in EXPRESSION are not treated
+specially and are removed. All tokens in the expression undergo
+parameter and variable expansion, command substitution, and quote
+removal. The result is treated as the arithmetic expression to be
+evaluated. Arithmetic expansions may be nested.
The evaluation is performed according to the rules listed below
(*note Shell Arithmetic::). If the expression is invalid, Bash prints a
@@ -3838,6 +3839,10 @@ standard.
If '-s' is used with '-f', the new builtin becomes a special
builtin (*note Special Builtins::).
+ If no options are supplied and a NAME is not a shell builtin,
+ 'enable' will attempt to load NAME from a shared object named NAME,
+ as if the command were 'enable -f NAME NAME'.
+
The return status is zero unless a NAME is not a shell builtin or
there is an error loading a new builtin from a shared object.
@@ -3958,6 +3963,9 @@ standard.
'%q'
Causes 'printf' to output the corresponding ARGUMENT in a
format that can be reused as shell input.
+ '%Q'
+ like '%q', but applies any supplied precision to the ARGUMENT
+ before quoting it.
'%(DATEFMT)T'
Causes 'printf' to output the date-time string resulting from
using DATEFMT as a format string for 'strftime'(3). The
@@ -4843,6 +4851,11 @@ This builtin allows you to change additional shell optional behavior.
filtering possible completions as part of programmable
completion.
+ 'noexpand_translation'
+ If set, Bash encloses the translated results of $"..."
+ quoting in single quotes instead of double quotes. If the
+ string is not translated, this has no effect.
+
'nullglob'
If set, Bash allows filename patterns which match no files to
expand to a null string, rather than themselves.
@@ -11508,26 +11521,26 @@ D.1 Index of Shell Builtin Commands
(line 147)
* hash: Bourne Shell Builtins.
(line 191)
-* help: Bash Builtins. (line 338)
+* help: Bash Builtins. (line 342)
* history: Bash History Builtins.
(line 46)
* jobs: Job Control Builtins.
(line 27)
* kill: Job Control Builtins.
(line 58)
-* let: Bash Builtins. (line 357)
-* local: Bash Builtins. (line 365)
-* logout: Bash Builtins. (line 381)
-* mapfile: Bash Builtins. (line 386)
+* let: Bash Builtins. (line 361)
+* local: Bash Builtins. (line 369)
+* logout: Bash Builtins. (line 385)
+* mapfile: Bash Builtins. (line 390)
* popd: Directory Stack Builtins.
(line 35)
-* printf: Bash Builtins. (line 432)
+* printf: Bash Builtins. (line 436)
* pushd: Directory Stack Builtins.
(line 69)
* pwd: Bourne Shell Builtins.
(line 211)
-* read: Bash Builtins. (line 481)
-* readarray: Bash Builtins. (line 577)
+* read: Bash Builtins. (line 488)
+* readarray: Bash Builtins. (line 584)
* readonly: Bourne Shell Builtins.
(line 221)
* return: Bourne Shell Builtins.
@@ -11536,7 +11549,7 @@ D.1 Index of Shell Builtin Commands
* shift: Bourne Shell Builtins.
(line 261)
* shopt: The Shopt Builtin. (line 9)
-* source: Bash Builtins. (line 586)
+* source: Bash Builtins. (line 593)
* suspend: Job Control Builtins.
(line 113)
* test: Bourne Shell Builtins.
@@ -11545,12 +11558,12 @@ D.1 Index of Shell Builtin Commands
(line 359)
* trap: Bourne Shell Builtins.
(line 365)
-* type: Bash Builtins. (line 591)
-* typeset: Bash Builtins. (line 623)
-* ulimit: Bash Builtins. (line 629)
+* type: Bash Builtins. (line 598)
+* typeset: Bash Builtins. (line 630)
+* ulimit: Bash Builtins. (line 636)
* umask: Bourne Shell Builtins.
(line 414)
-* unalias: Bash Builtins. (line 735)
+* unalias: Bash Builtins. (line 742)
* unset: Bourne Shell Builtins.
(line 432)
* wait: Job Control Builtins.
@@ -12212,138 +12225,138 @@ D.5 Concept Index

Tag Table:
-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 Scripts19038
-Node: Comments23155
-Node: Shell Commands23773
-Node: Reserved Words24711
-Node: Simple Commands25467
-Node: Pipelines26121
-Node: Lists29080
-Node: Compound Commands30875
-Node: Looping Constructs31887
-Node: Conditional Constructs34382
-Node: Command Grouping48672
-Node: Coprocesses50150
-Node: GNU Parallel52813
-Node: Shell Functions53730
-Node: Shell Parameters61021
-Node: Positional Parameters65472
-Node: Special Parameters66374
-Node: Shell Expansions69588
-Node: Brace Expansion71715
-Node: Tilde Expansion74449
-Node: Shell Parameter Expansion77070
-Node: Command Substitution92199
-Node: Arithmetic Expansion93554
-Node: Process Substitution94486
-Node: Word Splitting95606
-Node: Filename Expansion97550
-Node: Pattern Matching100150
-Node: Quote Removal104758
-Node: Redirections105053
-Node: Executing Commands114713
-Node: Simple Command Expansion115383
-Node: Command Search and Execution117337
-Node: Command Execution Environment119715
-Node: Environment122750
-Node: Exit Status124413
-Node: Signals126197
-Node: Shell Scripts128164
-Node: Shell Builtin Commands131177
-Node: Bourne Shell Builtins133215
-Node: Bash Builtins154676
-Node: Modifying Shell Behavior185190
-Node: The Set Builtin185535
-Node: The Shopt Builtin195948
-Node: Special Builtins211158
-Node: Shell Variables212137
-Node: Bourne Shell Variables212574
-Node: Bash Variables214678
-Node: Bash Features247493
-Node: Invoking Bash248506
-Node: Bash Startup Files254519
-Node: Interactive Shells259622
-Node: What is an Interactive Shell?260032
-Node: Is this Shell Interactive?260681
-Node: Interactive Shell Behavior261496
-Node: Bash Conditional Expressions265009
-Node: Shell Arithmetic269651
-Node: Aliases272595
-Node: Arrays275208
-Node: The Directory Stack281217
-Node: Directory Stack Builtins282001
-Node: Controlling the Prompt286261
-Node: The Restricted Shell289226
-Node: Bash POSIX Mode291823
-Node: Shell Compatibility Mode303096
-Node: Job Control309752
-Node: Job Control Basics310212
-Node: Job Control Builtins315214
-Node: Job Control Variables320614
-Node: Command Line Editing321770
-Node: Introduction and Notation323441
-Node: Readline Interaction325064
-Node: Readline Bare Essentials326255
-Node: Readline Movement Commands328038
-Node: Readline Killing Commands328998
-Node: Readline Arguments330916
-Node: Searching331960
-Node: Readline Init File334146
-Node: Readline Init File Syntax335407
-Node: Conditional Init Constructs356687
-Node: Sample Init File360883
-Node: Bindable Readline Commands364007
-Node: Commands For Moving365211
-Node: Commands For History367262
-Node: Commands For Text372256
-Node: Commands For Killing375905
-Node: Numeric Arguments378938
-Node: Commands For Completion380077
-Node: Keyboard Macros384268
-Node: Miscellaneous Commands384955
-Node: Readline vi Mode390894
-Node: Programmable Completion391801
-Node: Programmable Completion Builtins399581
-Node: A Programmable Completion Example410276
-Node: Using History Interactively415523
-Node: Bash History Facilities416207
-Node: Bash History Builtins419212
-Node: History Interaction424220
-Node: Event Designators427840
-Node: Word Designators429194
-Node: Modifiers430954
-Node: Installing Bash432765
-Node: Basic Installation433902
-Node: Compilers and Options437160
-Node: Compiling For Multiple Architectures437901
-Node: Installation Names439594
-Node: Specifying the System Type440412
-Node: Sharing Defaults441128
-Node: Operation Controls441801
-Node: Optional Features442759
-Node: Reporting Bugs453559
-Node: Major Differences From The Bourne Shell454834
-Node: GNU Free Documentation License471684
-Node: Indexes496861
-Node: Builtin Index497315
-Node: Reserved Word Index504142
-Node: Variable Index506590
-Node: Function Index523082
-Node: Concept Index536866
+Node: Top893
+Node: Introduction2809
+Node: What is Bash?3025
+Node: What is a shell?4139
+Node: Definitions6677
+Node: Basic Shell Features9628
+Node: Shell Syntax10847
+Node: Shell Operation11873
+Node: Quoting13166
+Node: Escape Character14470
+Node: Single Quotes14955
+Node: Double Quotes15303
+Node: ANSI-C Quoting16581
+Node: Locale Translation17891
+Node: Creating Internationalized Scripts19202
+Node: Comments23319
+Node: Shell Commands23937
+Node: Reserved Words24875
+Node: Simple Commands25631
+Node: Pipelines26285
+Node: Lists29244
+Node: Compound Commands31039
+Node: Looping Constructs32051
+Node: Conditional Constructs34546
+Node: Command Grouping48890
+Node: Coprocesses50368
+Node: GNU Parallel53031
+Node: Shell Functions53948
+Node: Shell Parameters61239
+Node: Positional Parameters65627
+Node: Special Parameters66529
+Node: Shell Expansions69743
+Node: Brace Expansion71870
+Node: Tilde Expansion74604
+Node: Shell Parameter Expansion77225
+Node: Command Substitution92354
+Node: Arithmetic Expansion93709
+Node: Process Substitution94677
+Node: Word Splitting95797
+Node: Filename Expansion97741
+Node: Pattern Matching100341
+Node: Quote Removal104949
+Node: Redirections105244
+Node: Executing Commands114904
+Node: Simple Command Expansion115574
+Node: Command Search and Execution117528
+Node: Command Execution Environment119906
+Node: Environment122941
+Node: Exit Status124604
+Node: Signals126388
+Node: Shell Scripts128355
+Node: Shell Builtin Commands131368
+Node: Bourne Shell Builtins133406
+Node: Bash Builtins154867
+Node: Modifying Shell Behavior185684
+Node: The Set Builtin186029
+Node: The Shopt Builtin196442
+Node: Special Builtins211871
+Node: Shell Variables212850
+Node: Bourne Shell Variables213287
+Node: Bash Variables215391
+Node: Bash Features248206
+Node: Invoking Bash249219
+Node: Bash Startup Files255232
+Node: Interactive Shells260335
+Node: What is an Interactive Shell?260745
+Node: Is this Shell Interactive?261394
+Node: Interactive Shell Behavior262209
+Node: Bash Conditional Expressions265722
+Node: Shell Arithmetic270364
+Node: Aliases273308
+Node: Arrays275921
+Node: The Directory Stack281930
+Node: Directory Stack Builtins282714
+Node: Controlling the Prompt286974
+Node: The Restricted Shell289939
+Node: Bash POSIX Mode292536
+Node: Shell Compatibility Mode303809
+Node: Job Control310465
+Node: Job Control Basics310925
+Node: Job Control Builtins315927
+Node: Job Control Variables321327
+Node: Command Line Editing322483
+Node: Introduction and Notation324154
+Node: Readline Interaction325777
+Node: Readline Bare Essentials326968
+Node: Readline Movement Commands328751
+Node: Readline Killing Commands329711
+Node: Readline Arguments331629
+Node: Searching332673
+Node: Readline Init File334859
+Node: Readline Init File Syntax336120
+Node: Conditional Init Constructs357400
+Node: Sample Init File361596
+Node: Bindable Readline Commands364720
+Node: Commands For Moving365924
+Node: Commands For History367975
+Node: Commands For Text372969
+Node: Commands For Killing376618
+Node: Numeric Arguments379651
+Node: Commands For Completion380790
+Node: Keyboard Macros384981
+Node: Miscellaneous Commands385668
+Node: Readline vi Mode391607
+Node: Programmable Completion392514
+Node: Programmable Completion Builtins400294
+Node: A Programmable Completion Example410989
+Node: Using History Interactively416236
+Node: Bash History Facilities416920
+Node: Bash History Builtins419925
+Node: History Interaction424933
+Node: Event Designators428553
+Node: Word Designators429907
+Node: Modifiers431667
+Node: Installing Bash433478
+Node: Basic Installation434615
+Node: Compilers and Options437873
+Node: Compiling For Multiple Architectures438614
+Node: Installation Names440307
+Node: Specifying the System Type441125
+Node: Sharing Defaults441841
+Node: Operation Controls442514
+Node: Optional Features443472
+Node: Reporting Bugs454272
+Node: Major Differences From The Bourne Shell455547
+Node: GNU Free Documentation License472397
+Node: Indexes497574
+Node: Builtin Index498028
+Node: Reserved Word Index504855
+Node: Variable Index507303
+Node: Function Index523795
+Node: Concept Index537579

End Tag Table