mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 10:42:28 +02:00
fix for LINENO after shell errors; fix for crash with !&; new read -E option
This commit is contained in:
+176
-161
@@ -2,9 +2,9 @@ This is bashref.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, 2 August 2023).
|
||||
Bash shell (version 5.3, 15 August 2023).
|
||||
|
||||
This is Edition 5.3, last updated 2 August 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 15 August 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Copyright (C) 1988-2023 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, 2 August 2023). The Bash home page is
|
||||
Bash shell (version 5.3, 15 August 2023). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 2 August 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 15 August 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -4264,7 +4264,7 @@ standard.
|
||||
assignment error occurs.
|
||||
|
||||
'read'
|
||||
read [-ers] [-a ANAME] [-d DELIM] [-i TEXT] [-n NCHARS]
|
||||
read [-Eers] [-a ANAME] [-d DELIM] [-i TEXT] [-n NCHARS]
|
||||
[-N NCHARS] [-p PROMPT] [-t TIMEOUT] [-u FD] [NAME ...]
|
||||
|
||||
One line is read from the standard input, or from the file
|
||||
@@ -4300,6 +4300,12 @@ standard.
|
||||
was not previously active) editing settings, but uses
|
||||
Readline's default filename completion.
|
||||
|
||||
'-E'
|
||||
Readline (*note Command Line Editing::) is used to obtain the
|
||||
line. Readline uses the current (or default, if line editing
|
||||
was not previously active) editing settings, but uses Bash's
|
||||
default completion, including programmable completion.
|
||||
|
||||
'-i TEXT'
|
||||
If Readline is being used to read the line, TEXT is placed
|
||||
into the editing buffer before editing begins.
|
||||
@@ -10415,13 +10421,19 @@ functions about quoting still in effect from previous lines.
|
||||
History expansion takes place in two parts. The first is to
|
||||
determine which line from the history list should be used during
|
||||
substitution. The second is to select portions of that line for
|
||||
inclusion into the current one. The line selected from the history is
|
||||
called the "event", and the portions of that line that are acted upon
|
||||
are called "words". Various "modifiers" are available to manipulate the
|
||||
selected words. The line is broken into words in the same fashion that
|
||||
Bash does, so that several words surrounded by quotes are considered one
|
||||
word. History expansions are introduced by the appearance of the
|
||||
history expansion character, which is '!' by default.
|
||||
inclusion into the current one.
|
||||
|
||||
The line selected from the history is called the "event", and the
|
||||
portions of that line that are acted upon are called "words". The line
|
||||
is broken into words in the same fashion that Bash does, so that several
|
||||
words surrounded by quotes are considered one word. The "event
|
||||
designator" selects the event, the optional "word designator" selects
|
||||
words from the event, and various optional "modifiers" are available to
|
||||
manipulate the selected words.
|
||||
|
||||
History expansions are introduced by the appearance of the history
|
||||
expansion character, which is '!' by default. History expansions may
|
||||
appear anywhere in the input, but do not nest.
|
||||
|
||||
History expansion implements shell-like quoting conventions: a
|
||||
backslash can be used to remove the special handling for the next
|
||||
@@ -10469,12 +10481,15 @@ File: bashref.info, Node: Event Designators, Next: Word Designators, Up: Hist
|
||||
|
||||
An event designator is a reference to a command line entry in the
|
||||
history list. Unless the reference is absolute, events are relative to
|
||||
the current position in the history list.
|
||||
the current position in the history list. The event designator consists
|
||||
of the portion of the word beginning with the history expansion
|
||||
character, and ending with the word designator if one is present, or the
|
||||
end of the word.
|
||||
|
||||
'!'
|
||||
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 the rest of the shell metacharacters
|
||||
defined above (*note Definitions::).
|
||||
|
||||
'!N'
|
||||
Refer to command line N.
|
||||
@@ -11434,13 +11449,13 @@ the baseline reference.
|
||||
variable as a default if no non-option arguments are supplied. The
|
||||
Bash 'read' builtin also accepts a prompt string with the '-p'
|
||||
option and will use Readline to obtain the line when given the '-e'
|
||||
option. The 'read' builtin also has additional options to control
|
||||
input: the '-s' option will turn off echoing of input characters as
|
||||
they are read, the '-t' option will allow 'read' to time out if
|
||||
input does not arrive within a specified number of seconds, the
|
||||
'-n' option will allow reading only a specified number of
|
||||
characters rather than a full line, and the '-d' option will read
|
||||
until a particular character rather than newline.
|
||||
or '-E' options. The 'read' builtin also has additional options to
|
||||
control input: the '-s' option will turn off echoing of input
|
||||
characters as they are read, the '-t' option will allow 'read' to
|
||||
time out if input does not arrive within a specified number of
|
||||
seconds, the '-n' option will allow reading only a specified number
|
||||
of characters rather than a full line, and the '-d' option will
|
||||
read until a particular character rather than newline.
|
||||
|
||||
* The 'return' builtin may be used to abort execution of scripts
|
||||
executed with the '.' or 'source' builtins (*note Bourne Shell
|
||||
@@ -12149,7 +12164,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 218)
|
||||
* read: Bash Builtins. (line 513)
|
||||
* readarray: Bash Builtins. (line 610)
|
||||
* readarray: Bash Builtins. (line 616)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 228)
|
||||
* return: Bourne Shell Builtins.
|
||||
@@ -12158,7 +12173,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 268)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 619)
|
||||
* source: Bash Builtins. (line 625)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 116)
|
||||
* test: Bourne Shell Builtins.
|
||||
@@ -12169,12 +12184,12 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 389)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 451)
|
||||
* type: Bash Builtins. (line 624)
|
||||
* typeset: Bash Builtins. (line 662)
|
||||
* ulimit: Bash Builtins. (line 668)
|
||||
* type: Bash Builtins. (line 630)
|
||||
* typeset: Bash Builtins. (line 668)
|
||||
* ulimit: Bash Builtins. (line 674)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 456)
|
||||
* unalias: Bash Builtins. (line 774)
|
||||
* unalias: Bash Builtins. (line 780)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 474)
|
||||
* wait: Job Control Builtins.
|
||||
@@ -12760,7 +12775,7 @@ D.5 Concept Index
|
||||
* functions, shell: Shell Functions. (line 6)
|
||||
* history builtins: Bash History Builtins.
|
||||
(line 6)
|
||||
* history events: Event Designators. (line 8)
|
||||
* history events: Event Designators. (line 11)
|
||||
* history expansion: History Interaction. (line 6)
|
||||
* history list: Bash History Facilities.
|
||||
(line 6)
|
||||
@@ -12850,138 +12865,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top891
|
||||
Node: Introduction2805
|
||||
Node: What is Bash?3021
|
||||
Node: What is a shell?4135
|
||||
Node: Definitions6673
|
||||
Node: Basic Shell Features9624
|
||||
Node: Shell Syntax10843
|
||||
Node: Shell Operation11869
|
||||
Node: Quoting13162
|
||||
Node: Escape Character14466
|
||||
Node: Single Quotes14951
|
||||
Node: Double Quotes15299
|
||||
Node: ANSI-C Quoting16577
|
||||
Node: Locale Translation17889
|
||||
Node: Creating Internationalized Scripts19200
|
||||
Node: Comments23317
|
||||
Node: Shell Commands23935
|
||||
Node: Reserved Words24873
|
||||
Node: Simple Commands25629
|
||||
Node: Pipelines26283
|
||||
Node: Lists29269
|
||||
Node: Compound Commands31064
|
||||
Node: Looping Constructs32076
|
||||
Node: Conditional Constructs34571
|
||||
Node: Command Grouping49059
|
||||
Node: Coprocesses50537
|
||||
Node: GNU Parallel53200
|
||||
Node: Shell Functions54117
|
||||
Node: Shell Parameters62002
|
||||
Node: Positional Parameters66390
|
||||
Node: Special Parameters67292
|
||||
Node: Shell Expansions70506
|
||||
Node: Brace Expansion72594
|
||||
Node: Tilde Expansion75328
|
||||
Node: Shell Parameter Expansion77949
|
||||
Node: Command Substitution96542
|
||||
Node: Arithmetic Expansion100006
|
||||
Node: Process Substitution100974
|
||||
Node: Word Splitting102094
|
||||
Node: Filename Expansion104142
|
||||
Node: Pattern Matching107075
|
||||
Node: Quote Removal112077
|
||||
Node: Redirections112372
|
||||
Node: Executing Commands122065
|
||||
Node: Simple Command Expansion122735
|
||||
Node: Command Search and Execution124845
|
||||
Node: Command Execution Environment127232
|
||||
Node: Environment130267
|
||||
Node: Exit Status131930
|
||||
Node: Signals133714
|
||||
Node: Shell Scripts137163
|
||||
Node: Shell Builtin Commands140190
|
||||
Node: Bourne Shell Builtins142228
|
||||
Node: Bash Builtins165364
|
||||
Node: Modifying Shell Behavior198010
|
||||
Node: The Set Builtin198355
|
||||
Node: The Shopt Builtin209329
|
||||
Node: Special Builtins225467
|
||||
Node: Shell Variables226446
|
||||
Node: Bourne Shell Variables226883
|
||||
Node: Bash Variables228987
|
||||
Node: Bash Features264046
|
||||
Node: Invoking Bash265059
|
||||
Node: Bash Startup Files271098
|
||||
Node: Interactive Shells276229
|
||||
Node: What is an Interactive Shell?276640
|
||||
Node: Is this Shell Interactive?277289
|
||||
Node: Interactive Shell Behavior278104
|
||||
Node: Bash Conditional Expressions281733
|
||||
Node: Shell Arithmetic286375
|
||||
Node: Aliases289336
|
||||
Node: Arrays292230
|
||||
Node: The Directory Stack298791
|
||||
Node: Directory Stack Builtins299575
|
||||
Node: Controlling the Prompt303835
|
||||
Node: The Restricted Shell306800
|
||||
Node: Bash POSIX Mode309410
|
||||
Node: Shell Compatibility Mode325571
|
||||
Node: Job Control333815
|
||||
Node: Job Control Basics334275
|
||||
Node: Job Control Builtins339277
|
||||
Node: Job Control Variables345072
|
||||
Node: Command Line Editing346228
|
||||
Node: Introduction and Notation347899
|
||||
Node: Readline Interaction349522
|
||||
Node: Readline Bare Essentials350713
|
||||
Node: Readline Movement Commands352502
|
||||
Node: Readline Killing Commands353462
|
||||
Node: Readline Arguments355383
|
||||
Node: Searching356427
|
||||
Node: Readline Init File358613
|
||||
Node: Readline Init File Syntax359874
|
||||
Node: Conditional Init Constructs383899
|
||||
Node: Sample Init File388095
|
||||
Node: Bindable Readline Commands391219
|
||||
Node: Commands For Moving392423
|
||||
Node: Commands For History394474
|
||||
Node: Commands For Text399468
|
||||
Node: Commands For Killing403446
|
||||
Node: Numeric Arguments406150
|
||||
Node: Commands For Completion407289
|
||||
Node: Keyboard Macros411480
|
||||
Node: Miscellaneous Commands412168
|
||||
Node: Readline vi Mode418206
|
||||
Node: Programmable Completion419113
|
||||
Node: Programmable Completion Builtins426893
|
||||
Node: A Programmable Completion Example438013
|
||||
Node: Using History Interactively443261
|
||||
Node: Bash History Facilities443945
|
||||
Node: Bash History Builtins446956
|
||||
Node: History Interaction452047
|
||||
Node: Event Designators455667
|
||||
Node: Word Designators457037
|
||||
Node: Modifiers458902
|
||||
Node: Installing Bash460710
|
||||
Node: Basic Installation461847
|
||||
Node: Compilers and Options465569
|
||||
Node: Compiling For Multiple Architectures466310
|
||||
Node: Installation Names468002
|
||||
Node: Specifying the System Type470111
|
||||
Node: Sharing Defaults470828
|
||||
Node: Operation Controls471501
|
||||
Node: Optional Features472459
|
||||
Node: Reporting Bugs483678
|
||||
Node: Major Differences From The Bourne Shell485012
|
||||
Node: GNU Free Documentation License501861
|
||||
Node: Indexes527038
|
||||
Node: Builtin Index527492
|
||||
Node: Reserved Word Index534593
|
||||
Node: Variable Index537041
|
||||
Node: Function Index554175
|
||||
Node: Concept Index567896
|
||||
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 Translation17893
|
||||
Node: Creating Internationalized Scripts19204
|
||||
Node: Comments23321
|
||||
Node: Shell Commands23939
|
||||
Node: Reserved Words24877
|
||||
Node: Simple Commands25633
|
||||
Node: Pipelines26287
|
||||
Node: Lists29273
|
||||
Node: Compound Commands31068
|
||||
Node: Looping Constructs32080
|
||||
Node: Conditional Constructs34575
|
||||
Node: Command Grouping49063
|
||||
Node: Coprocesses50541
|
||||
Node: GNU Parallel53204
|
||||
Node: Shell Functions54121
|
||||
Node: Shell Parameters62006
|
||||
Node: Positional Parameters66394
|
||||
Node: Special Parameters67296
|
||||
Node: Shell Expansions70510
|
||||
Node: Brace Expansion72598
|
||||
Node: Tilde Expansion75332
|
||||
Node: Shell Parameter Expansion77953
|
||||
Node: Command Substitution96546
|
||||
Node: Arithmetic Expansion100010
|
||||
Node: Process Substitution100978
|
||||
Node: Word Splitting102098
|
||||
Node: Filename Expansion104146
|
||||
Node: Pattern Matching107079
|
||||
Node: Quote Removal112081
|
||||
Node: Redirections112376
|
||||
Node: Executing Commands122069
|
||||
Node: Simple Command Expansion122739
|
||||
Node: Command Search and Execution124849
|
||||
Node: Command Execution Environment127236
|
||||
Node: Environment130271
|
||||
Node: Exit Status131934
|
||||
Node: Signals133718
|
||||
Node: Shell Scripts137167
|
||||
Node: Shell Builtin Commands140194
|
||||
Node: Bourne Shell Builtins142232
|
||||
Node: Bash Builtins165368
|
||||
Node: Modifying Shell Behavior198306
|
||||
Node: The Set Builtin198651
|
||||
Node: The Shopt Builtin209625
|
||||
Node: Special Builtins225763
|
||||
Node: Shell Variables226742
|
||||
Node: Bourne Shell Variables227179
|
||||
Node: Bash Variables229283
|
||||
Node: Bash Features264342
|
||||
Node: Invoking Bash265355
|
||||
Node: Bash Startup Files271394
|
||||
Node: Interactive Shells276525
|
||||
Node: What is an Interactive Shell?276936
|
||||
Node: Is this Shell Interactive?277585
|
||||
Node: Interactive Shell Behavior278400
|
||||
Node: Bash Conditional Expressions282029
|
||||
Node: Shell Arithmetic286671
|
||||
Node: Aliases289632
|
||||
Node: Arrays292526
|
||||
Node: The Directory Stack299087
|
||||
Node: Directory Stack Builtins299871
|
||||
Node: Controlling the Prompt304131
|
||||
Node: The Restricted Shell307096
|
||||
Node: Bash POSIX Mode309706
|
||||
Node: Shell Compatibility Mode325867
|
||||
Node: Job Control334111
|
||||
Node: Job Control Basics334571
|
||||
Node: Job Control Builtins339573
|
||||
Node: Job Control Variables345368
|
||||
Node: Command Line Editing346524
|
||||
Node: Introduction and Notation348195
|
||||
Node: Readline Interaction349818
|
||||
Node: Readline Bare Essentials351009
|
||||
Node: Readline Movement Commands352798
|
||||
Node: Readline Killing Commands353758
|
||||
Node: Readline Arguments355679
|
||||
Node: Searching356723
|
||||
Node: Readline Init File358909
|
||||
Node: Readline Init File Syntax360170
|
||||
Node: Conditional Init Constructs384195
|
||||
Node: Sample Init File388391
|
||||
Node: Bindable Readline Commands391515
|
||||
Node: Commands For Moving392719
|
||||
Node: Commands For History394770
|
||||
Node: Commands For Text399764
|
||||
Node: Commands For Killing403742
|
||||
Node: Numeric Arguments406446
|
||||
Node: Commands For Completion407585
|
||||
Node: Keyboard Macros411776
|
||||
Node: Miscellaneous Commands412464
|
||||
Node: Readline vi Mode418502
|
||||
Node: Programmable Completion419409
|
||||
Node: Programmable Completion Builtins427189
|
||||
Node: A Programmable Completion Example438309
|
||||
Node: Using History Interactively443557
|
||||
Node: Bash History Facilities444241
|
||||
Node: Bash History Builtins447252
|
||||
Node: History Interaction452343
|
||||
Node: Event Designators456156
|
||||
Node: Word Designators457694
|
||||
Node: Modifiers459559
|
||||
Node: Installing Bash461367
|
||||
Node: Basic Installation462504
|
||||
Node: Compilers and Options466226
|
||||
Node: Compiling For Multiple Architectures466967
|
||||
Node: Installation Names468659
|
||||
Node: Specifying the System Type470768
|
||||
Node: Sharing Defaults471485
|
||||
Node: Operation Controls472158
|
||||
Node: Optional Features473116
|
||||
Node: Reporting Bugs484335
|
||||
Node: Major Differences From The Bourne Shell485669
|
||||
Node: GNU Free Documentation License502527
|
||||
Node: Indexes527704
|
||||
Node: Builtin Index528158
|
||||
Node: Reserved Word Index535259
|
||||
Node: Variable Index537707
|
||||
Node: Function Index554841
|
||||
Node: Concept Index568562
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user