add more characters to inhibit history expansion; allow asynchronous !' and time' commands without a pipeline

This commit is contained in:
Chet Ramey
2023-08-11 10:32:40 -04:00
parent 1d0c4ceb49
commit 85b466d64f
14 changed files with 3107 additions and 2925 deletions
+213 -208
View File
@@ -1,9 +1,9 @@
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.3, 31 July 2023).
Bash shell (version 5.3, 2 August 2023).
This is Edition 5.3, last updated 31 July 2023, of 'The GNU Bash
This is Edition 5.3, last updated 2 August 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@@ -26,10 +26,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 31 July 2023). The Bash home page is
Bash shell (version 5.3, 2 August 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 31 July 2023, of 'The GNU Bash
This is Edition 5.3, last updated 2 August 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -4742,8 +4742,8 @@ parameters, or to display the names and values of shell variables.
user and group ids.
'-r'
Enable restricted shell mode. This option cannot be unset
once it has been set.
Enable restricted shell mode (*note The Restricted Shell::).
This option cannot be unset once it has been set.
'-t'
Exit after reading and executing one command.
@@ -5753,8 +5753,9 @@ Variables::).
regardless of the value of 'HISTCONTROL'.
'HISTFILE'
The name of the file to which the command history is saved. The
default value is '~/.bash_history'.
The name of the file to which the command history is saved. Bash
assigns a default value of '~/.bash_history'. If 'HISTFILE' is
unset or null, the command history is not saved when a shell exits.
'HISTFILESIZE'
The maximum number of lines contained in the history file. When
@@ -6174,7 +6175,8 @@ single-character options to be recognized.
POSIX Mode::, for a description of the Bash POSIX mode.
'--restricted'
Make the shell a restricted shell (*note The Restricted Shell::).
Equivalent to '-r'. Make the shell a restricted shell (*note The
Restricted Shell::).
'--verbose'
Equivalent to '-v'. Print shell input lines as they're read.
@@ -6907,7 +6909,7 @@ index of -1 refers to the last element.
Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0. Any reference to a variable using a
valid subscript is legal, and 'bash' will create an array if necessary.
valid subscript is legal, and Bash will create an array if necessary.
An array variable is considered set if a subscript has been assigned
a value. The null string is a valid value.
@@ -7318,7 +7320,7 @@ startup files.
command name, rather than on all assignment statements on the line.
12. The default history file is '~/.sh_history' (this is the default
value of '$HISTFILE').
value the shell assigns to '$HISTFILE').
13. Redirection operators do not perform filename expansion on the
word in the redirection unless the shell is interactive.
@@ -7538,7 +7540,7 @@ startup files.
67. The 'test' builtin's '-t' unary primary requires an argument.
Historical versions of 'test' made the argument optional in certain
cases, and bash attempts to accommodate those for backwards
cases, and Bash attempts to accommodate those for backwards
compatibility.
68. Command substitutions don't set the '?' special parameter. The
@@ -10241,9 +10243,9 @@ no more than the number of lines specified by the value of the
last '$HISTSIZE' lines are copied from the history list to the file
named by '$HISTFILE'. If the 'histappend' shell option is set (*note
Bash Builtins::), the lines are appended to the history file, otherwise
the history file is overwritten. If 'HISTFILE' is unset, or if the
history file is unwritable, the history is not saved. After saving the
history, the history file is truncated to contain no more than
the history file is overwritten. If 'HISTFILE' is unset or null, or if
the history file is unwritable, the history is not saved. After saving
the history, the history file is truncated to contain no more than
'$HISTFILESIZE' lines. If 'HISTFILESIZE' is unset, or set to null, a
non-numeric value, or a numeric value less than zero, the history file
is not truncated.
@@ -10254,7 +10256,7 @@ history comment character. When the history file is read, lines
beginning with the history comment character followed immediately by a
digit are interpreted as timestamps for the following history entry.
The builtin command 'fc' may be used to list or edit and re-execute a
The 'fc' builtin command may be used to list or edit and re-execute a
portion of the history list. The 'history' builtin may be used to
display or modify the history list and manipulate the history file.
When using command-line editing, search commands are available in each
@@ -10262,7 +10264,7 @@ editing mode that provide access to the history list (*note Commands For
History::).
The shell allows control over which commands are saved on the history
list. The 'HISTCONTROL' and 'HISTIGNORE' variables may be set to cause
list. The 'HISTCONTROL' and 'HISTIGNORE' variables are used to cause
the shell to save only a subset of the commands entered. The 'cmdhist'
shell option, if enabled, causes the shell to attempt to save each line
of a multi-line command in the same history entry, adding semicolons
@@ -10382,6 +10384,7 @@ history file.
If a FILENAME argument is supplied when any of the '-w', '-r',
'-a', or '-n' options is used, Bash uses FILENAME as the history
file. If not, then the value of the 'HISTFILE' variable is used.
If 'HISTFILE' is unset or null, these options have no effect.
The return value is 0 unless an invalid option is encountered, an
error occurs while reading or writing the history file, an invalid
@@ -10469,8 +10472,8 @@ the current position in the history list.
'!'
Start a history substitution, except when followed by a space, tab,
the end of the line, '=' or '(' (when the 'extglob' shell option is
enabled using the 'shopt' builtin).
the end of the line, '=', ';', '&', '|', or '(' (when the 'extglob'
shell option is enabled using the 'shopt' builtin).
'!N'
Refer to command line N.
@@ -10505,12 +10508,14 @@ File: bash.info, Node: Word Designators, Next: Modifiers, Prev: Event Designa
9.3.2 Word Designators
----------------------
Word designators are used to select desired words from the event. A ':'
separates the event specification from the word designator. It may be
omitted if the word designator begins with a '^', '$', '*', '-', or '%'.
Words are numbered from the beginning of the line, with the first word
being denoted by 0 (zero). Words are inserted into the current line
separated by single spaces.
Word designators are used to select desired words from the event. They
are optional; if the word designator isn't supplied, the history
expansion uses the entire event. A ':' separates the event
specification from the word designator. It may be omitted if the word
designator begins with a '^', '$', '*', '-', or '%'. Words are numbered
from the beginning of the line, with the first word being denoted by 0
(zero). Words are inserted into the current line separated by single
spaces.
For example,
@@ -12342,52 +12347,52 @@ D.3 Parameter and Variable Index
* HISTCMD: Bash Variables. (line 420)
* HISTCONTROL: Bash Variables. (line 426)
* HISTFILE: Bash Variables. (line 442)
* HISTFILESIZE: Bash Variables. (line 446)
* HISTIGNORE: Bash Variables. (line 457)
* HISTFILESIZE: Bash Variables. (line 447)
* HISTIGNORE: Bash Variables. (line 458)
* history-preserve-point: Readline Init File Syntax.
(line 214)
* history-size: Readline Init File Syntax.
(line 220)
* HISTSIZE: Bash Variables. (line 477)
* HISTTIMEFORMAT: Bash Variables. (line 484)
* HISTSIZE: Bash Variables. (line 478)
* HISTTIMEFORMAT: Bash Variables. (line 485)
* HOME: Bourne Shell Variables.
(line 13)
* horizontal-scroll-mode: Readline Init File Syntax.
(line 229)
* HOSTFILE: Bash Variables. (line 492)
* HOSTNAME: Bash Variables. (line 503)
* HOSTTYPE: Bash Variables. (line 506)
* HOSTFILE: Bash Variables. (line 493)
* HOSTNAME: Bash Variables. (line 504)
* HOSTTYPE: Bash Variables. (line 507)
* IFS: Bourne Shell Variables.
(line 18)
* IGNOREEOF: Bash Variables. (line 509)
* IGNOREEOF: Bash Variables. (line 510)
* input-meta: Readline Init File Syntax.
(line 238)
* INPUTRC: Bash Variables. (line 519)
* INSIDE_EMACS: Bash Variables. (line 523)
* INPUTRC: Bash Variables. (line 520)
* INSIDE_EMACS: Bash Variables. (line 524)
* isearch-terminators: Readline Init File Syntax.
(line 248)
* keymap: Readline Init File Syntax.
(line 255)
* LANG: Creating Internationalized Scripts.
(line 51)
* LANG <1>: Bash Variables. (line 529)
* LC_ALL: Bash Variables. (line 533)
* LC_COLLATE: Bash Variables. (line 537)
* LC_CTYPE: Bash Variables. (line 544)
* LANG <1>: Bash Variables. (line 530)
* LC_ALL: Bash Variables. (line 534)
* LC_COLLATE: Bash Variables. (line 538)
* LC_CTYPE: Bash Variables. (line 545)
* LC_MESSAGES: Creating Internationalized Scripts.
(line 51)
* LC_MESSAGES <1>: Bash Variables. (line 549)
* LC_NUMERIC: Bash Variables. (line 553)
* LC_TIME: Bash Variables. (line 557)
* LINENO: Bash Variables. (line 561)
* LINES: Bash Variables. (line 566)
* MACHTYPE: Bash Variables. (line 572)
* LC_MESSAGES <1>: Bash Variables. (line 550)
* LC_NUMERIC: Bash Variables. (line 554)
* LC_TIME: Bash Variables. (line 558)
* LINENO: Bash Variables. (line 562)
* LINES: Bash Variables. (line 567)
* MACHTYPE: Bash Variables. (line 573)
* MAIL: Bourne Shell Variables.
(line 22)
* MAILCHECK: Bash Variables. (line 576)
* MAILCHECK: Bash Variables. (line 577)
* MAILPATH: Bourne Shell Variables.
(line 27)
* MAPFILE: Bash Variables. (line 584)
* MAPFILE: Bash Variables. (line 585)
* mark-modified-lines: Readline Init File Syntax.
(line 285)
* mark-symlinked-directories: Readline Init File Syntax.
@@ -12398,46 +12403,46 @@ D.3 Parameter and Variable Index
(line 302)
* meta-flag: Readline Init File Syntax.
(line 238)
* OLDPWD: Bash Variables. (line 588)
* OLDPWD: Bash Variables. (line 589)
* OPTARG: Bourne Shell Variables.
(line 34)
* OPTERR: Bash Variables. (line 591)
* OPTERR: Bash Variables. (line 592)
* OPTIND: Bourne Shell Variables.
(line 38)
* OSTYPE: Bash Variables. (line 595)
* OSTYPE: Bash Variables. (line 596)
* output-meta: Readline Init File Syntax.
(line 307)
* page-completions: Readline Init File Syntax.
(line 315)
* PATH: Bourne Shell Variables.
(line 42)
* PIPESTATUS: Bash Variables. (line 598)
* POSIXLY_CORRECT: Bash Variables. (line 603)
* PPID: Bash Variables. (line 613)
* PROMPT_COMMAND: Bash Variables. (line 617)
* PROMPT_DIRTRIM: Bash Variables. (line 623)
* PS0: Bash Variables. (line 629)
* PIPESTATUS: Bash Variables. (line 599)
* POSIXLY_CORRECT: Bash Variables. (line 604)
* PPID: Bash Variables. (line 614)
* PROMPT_COMMAND: Bash Variables. (line 618)
* PROMPT_DIRTRIM: Bash Variables. (line 624)
* PS0: Bash Variables. (line 630)
* PS1: Bourne Shell Variables.
(line 48)
* PS2: Bourne Shell Variables.
(line 53)
* PS3: Bash Variables. (line 634)
* PS4: Bash Variables. (line 639)
* PWD: Bash Variables. (line 647)
* RANDOM: Bash Variables. (line 650)
* READLINE_ARGUMENT: Bash Variables. (line 656)
* READLINE_LINE: Bash Variables. (line 660)
* READLINE_MARK: Bash Variables. (line 664)
* READLINE_POINT: Bash Variables. (line 670)
* REPLY: Bash Variables. (line 674)
* PS3: Bash Variables. (line 635)
* PS4: Bash Variables. (line 640)
* PWD: Bash Variables. (line 648)
* RANDOM: Bash Variables. (line 651)
* READLINE_ARGUMENT: Bash Variables. (line 657)
* READLINE_LINE: Bash Variables. (line 661)
* READLINE_MARK: Bash Variables. (line 665)
* READLINE_POINT: Bash Variables. (line 671)
* REPLY: Bash Variables. (line 675)
* revert-all-at-newline: Readline Init File Syntax.
(line 325)
* search-ignore-case: Readline Init File Syntax.
(line 332)
* SECONDS: Bash Variables. (line 677)
* SHELL: Bash Variables. (line 686)
* SHELLOPTS: Bash Variables. (line 691)
* SHLVL: Bash Variables. (line 700)
* SECONDS: Bash Variables. (line 678)
* SHELL: Bash Variables. (line 687)
* SHELLOPTS: Bash Variables. (line 692)
* SHLVL: Bash Variables. (line 701)
* show-all-if-ambiguous: Readline Init File Syntax.
(line 337)
* show-all-if-unmodified: Readline Init File Syntax.
@@ -12446,15 +12451,15 @@ D.3 Parameter and Variable Index
(line 352)
* skip-completed-text: Readline Init File Syntax.
(line 358)
* SRANDOM: Bash Variables. (line 705)
* SRANDOM: Bash Variables. (line 706)
* TEXTDOMAIN: Creating Internationalized Scripts.
(line 51)
* TEXTDOMAINDIR: Creating Internationalized Scripts.
(line 51)
* TIMEFORMAT: Bash Variables. (line 714)
* TMOUT: Bash Variables. (line 752)
* TMPDIR: Bash Variables. (line 764)
* UID: Bash Variables. (line 768)
* TIMEFORMAT: Bash Variables. (line 715)
* TMOUT: Bash Variables. (line 753)
* TMPDIR: Bash Variables. (line 765)
* UID: Bash Variables. (line 769)
* vi-cmd-mode-string: Readline Init File Syntax.
(line 371)
* vi-ins-mode-string: Readline Init File Syntax.
@@ -12765,7 +12770,7 @@ D.5 Concept Index
* installation: Basic Installation. (line 6)
* interaction, readline: Readline Interaction.
(line 6)
* interactive shell: Invoking Bash. (line 131)
* interactive shell: Invoking Bash. (line 132)
* interactive shell <1>: Interactive Shells. (line 6)
* internationalization: Locale Translation. (line 6)
* internationalized scripts: Creating Internationalized Scripts.
@@ -12778,7 +12783,7 @@ D.5 Concept Index
* killing text: Readline Killing Commands.
(line 6)
* localization: Locale Translation. (line 6)
* login shell: Invoking Bash. (line 128)
* login shell: Invoking Bash. (line 129)
* matching, pattern: Pattern Matching. (line 6)
* metacharacter: Definitions. (line 46)
* name: Definitions. (line 51)
@@ -12844,138 +12849,138 @@ D.5 Concept Index

Tag Table:
Node: Top886
Node: Introduction2795
Node: What is Bash?3008
Node: What is a shell?4119
Node: Definitions6654
Node: Basic Shell Features9602
Node: Shell Syntax10818
Node: Shell Operation11841
Node: Quoting13131
Node: Escape Character14432
Node: Single Quotes14914
Node: Double Quotes15259
Node: ANSI-C Quoting16534
Node: Locale Translation17843
Node: Creating Internationalized Scripts19151
Node: Comments23265
Node: Shell Commands23880
Node: Reserved Words24815
Node: Simple Commands25568
Node: Pipelines26219
Node: Lists29202
Node: Compound Commands30994
Node: Looping Constructs32003
Node: Conditional Constructs34495
Node: Command Grouping48980
Node: Coprocesses50455
Node: GNU Parallel53115
Node: Shell Functions54029
Node: Shell Parameters61911
Node: Positional Parameters66296
Node: Special Parameters67195
Node: Shell Expansions70406
Node: Brace Expansion72491
Node: Tilde Expansion75222
Node: Shell Parameter Expansion77840
Node: Command Substitution96430
Node: Arithmetic Expansion99891
Node: Process Substitution100856
Node: Word Splitting101973
Node: Filename Expansion104018
Node: Pattern Matching106948
Node: Quote Removal111947
Node: Redirections112239
Node: Executing Commands121929
Node: Simple Command Expansion122596
Node: Command Search and Execution124703
Node: Command Execution Environment127087
Node: Environment130119
Node: Exit Status131779
Node: Signals133560
Node: Shell Scripts137006
Node: Shell Builtin Commands140030
Node: Bourne Shell Builtins142065
Node: Bash Builtins165198
Node: Modifying Shell Behavior197841
Node: The Set Builtin198183
Node: The Shopt Builtin209124
Node: Special Builtins225259
Node: Shell Variables226235
Node: Bourne Shell Variables226669
Node: Bash Variables228770
Node: Bash Features263724
Node: Invoking Bash264734
Node: Bash Startup Files270744
Node: Interactive Shells275872
Node: What is an Interactive Shell?276280
Node: Is this Shell Interactive?276926
Node: Interactive Shell Behavior277738
Node: Bash Conditional Expressions281364
Node: Shell Arithmetic286003
Node: Aliases288961
Node: Arrays291852
Node: The Directory Stack298412
Node: Directory Stack Builtins299193
Node: Controlling the Prompt303450
Node: The Restricted Shell306412
Node: Bash POSIX Mode309019
Node: Shell Compatibility Mode325159
Node: Job Control333400
Node: Job Control Basics333857
Node: Job Control Builtins338856
Node: Job Control Variables344648
Node: Command Line Editing345801
Node: Introduction and Notation347469
Node: Readline Interaction349089
Node: Readline Bare Essentials350277
Node: Readline Movement Commands352063
Node: Readline Killing Commands353020
Node: Readline Arguments354938
Node: Searching355979
Node: Readline Init File358162
Node: Readline Init File Syntax359420
Node: Conditional Init Constructs383442
Node: Sample Init File387635
Node: Bindable Readline Commands390756
Node: Commands For Moving391957
Node: Commands For History394005
Node: Commands For Text398996
Node: Commands For Killing402971
Node: Numeric Arguments405672
Node: Commands For Completion406808
Node: Keyboard Macros410996
Node: Miscellaneous Commands411681
Node: Readline vi Mode417716
Node: Programmable Completion418620
Node: Programmable Completion Builtins426397
Node: A Programmable Completion Example437514
Node: Using History Interactively442759
Node: Bash History Facilities443440
Node: Bash History Builtins446442
Node: History Interaction451463
Node: Event Designators455080
Node: Word Designators456431
Node: Modifiers458188
Node: Installing Bash459993
Node: Basic Installation461127
Node: Compilers and Options464846
Node: Compiling For Multiple Architectures465584
Node: Installation Names467273
Node: Specifying the System Type469379
Node: Sharing Defaults470093
Node: Operation Controls470763
Node: Optional Features471718
Node: Reporting Bugs482934
Node: Major Differences From The Bourne Shell484265
Node: GNU Free Documentation License501111
Node: Indexes526285
Node: Builtin Index526736
Node: Reserved Word Index533834
Node: Variable Index536279
Node: Function Index553410
Node: Concept Index567128
Node: Top888
Node: Introduction2799
Node: What is Bash?3012
Node: What is a shell?4123
Node: Definitions6658
Node: Basic Shell Features9606
Node: Shell Syntax10822
Node: Shell Operation11845
Node: Quoting13135
Node: Escape Character14436
Node: Single Quotes14918
Node: Double Quotes15263
Node: ANSI-C Quoting16538
Node: Locale Translation17847
Node: Creating Internationalized Scripts19155
Node: Comments23269
Node: Shell Commands23884
Node: Reserved Words24819
Node: Simple Commands25572
Node: Pipelines26223
Node: Lists29206
Node: Compound Commands30998
Node: Looping Constructs32007
Node: Conditional Constructs34499
Node: Command Grouping48984
Node: Coprocesses50459
Node: GNU Parallel53119
Node: Shell Functions54033
Node: Shell Parameters61915
Node: Positional Parameters66300
Node: Special Parameters67199
Node: Shell Expansions70410
Node: Brace Expansion72495
Node: Tilde Expansion75226
Node: Shell Parameter Expansion77844
Node: Command Substitution96434
Node: Arithmetic Expansion99895
Node: Process Substitution100860
Node: Word Splitting101977
Node: Filename Expansion104022
Node: Pattern Matching106952
Node: Quote Removal111951
Node: Redirections112243
Node: Executing Commands121933
Node: Simple Command Expansion122600
Node: Command Search and Execution124707
Node: Command Execution Environment127091
Node: Environment130123
Node: Exit Status131783
Node: Signals133564
Node: Shell Scripts137010
Node: Shell Builtin Commands140034
Node: Bourne Shell Builtins142069
Node: Bash Builtins165202
Node: Modifying Shell Behavior197845
Node: The Set Builtin198187
Node: The Shopt Builtin209158
Node: Special Builtins225293
Node: Shell Variables226269
Node: Bourne Shell Variables226703
Node: Bash Variables228804
Node: Bash Features263860
Node: Invoking Bash264870
Node: Bash Startup Files270906
Node: Interactive Shells276034
Node: What is an Interactive Shell?276442
Node: Is this Shell Interactive?277088
Node: Interactive Shell Behavior277900
Node: Bash Conditional Expressions281526
Node: Shell Arithmetic286165
Node: Aliases289123
Node: Arrays292014
Node: The Directory Stack298572
Node: Directory Stack Builtins299353
Node: Controlling the Prompt303610
Node: The Restricted Shell306572
Node: Bash POSIX Mode309179
Node: Shell Compatibility Mode325337
Node: Job Control333578
Node: Job Control Basics334035
Node: Job Control Builtins339034
Node: Job Control Variables344826
Node: Command Line Editing345979
Node: Introduction and Notation347647
Node: Readline Interaction349267
Node: Readline Bare Essentials350455
Node: Readline Movement Commands352241
Node: Readline Killing Commands353198
Node: Readline Arguments355116
Node: Searching356157
Node: Readline Init File358340
Node: Readline Init File Syntax359598
Node: Conditional Init Constructs383620
Node: Sample Init File387813
Node: Bindable Readline Commands390934
Node: Commands For Moving392135
Node: Commands For History394183
Node: Commands For Text399174
Node: Commands For Killing403149
Node: Numeric Arguments405850
Node: Commands For Completion406986
Node: Keyboard Macros411174
Node: Miscellaneous Commands411859
Node: Readline vi Mode417894
Node: Programmable Completion418798
Node: Programmable Completion Builtins426575
Node: A Programmable Completion Example437692
Node: Using History Interactively442937
Node: Bash History Facilities443618
Node: Bash History Builtins446626
Node: History Interaction451714
Node: Event Designators455331
Node: Word Designators456698
Node: Modifiers458560
Node: Installing Bash460365
Node: Basic Installation461499
Node: Compilers and Options465218
Node: Compiling For Multiple Architectures465956
Node: Installation Names467645
Node: Specifying the System Type469751
Node: Sharing Defaults470465
Node: Operation Controls471135
Node: Optional Features472090
Node: Reporting Bugs483306
Node: Major Differences From The Bourne Shell484637
Node: GNU Free Documentation License501483
Node: Indexes526657
Node: Builtin Index527108
Node: Reserved Word Index534206
Node: Variable Index536651
Node: Function Index553782
Node: Concept Index567500

End Tag Table