mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-03 10:20:49 +02:00
fix for programmable completion functions setting traps on signals that readline handles
This commit is contained in:
+186
-177
@@ -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.2, 19 September 2022).
|
||||
Bash shell (version 5.2, 2 December 2022).
|
||||
|
||||
This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 2 December 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Copyright (C) 1988-2022 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.2, 19 September 2022). The Bash home page is
|
||||
Bash shell (version 5.2, 2 December 2022). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 2 December 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -1832,7 +1832,7 @@ immediately follow the left brace in order to 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 form described
|
||||
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
|
||||
@@ -3563,37 +3563,43 @@ standard.
|
||||
children. The return status is zero.
|
||||
|
||||
'trap'
|
||||
trap [-lp] [ARG] [SIGSPEC ...]
|
||||
trap [-lp] [ACTION] [SIGSPEC ...]
|
||||
|
||||
The commands in ARG are to be read and executed when the shell
|
||||
receives signal SIGSPEC. If ARG is absent (and there is a single
|
||||
SIGSPEC) or equal to '-', each specified signal's disposition is
|
||||
reset to the value it had when the shell was started. If ARG is
|
||||
the null string, then the signal specified by each SIGSPEC is
|
||||
ignored by the shell and commands it invokes. If ARG is not
|
||||
present and '-p' has been supplied, the shell displays the trap
|
||||
commands associated with each SIGSPEC. If no arguments are
|
||||
supplied, or only '-p' is given, 'trap' prints the list of commands
|
||||
associated with each signal number in a form that may be reused as
|
||||
shell input. The '-l' option causes the shell to print a list of
|
||||
signal names and their corresponding numbers. Each SIGSPEC is
|
||||
either a signal name or a signal number. Signal names are case
|
||||
insensitive and the 'SIG' prefix is optional.
|
||||
The ACTION is a command that is read and executed when the shell
|
||||
receives signal SIGSPEC. If ACTION is absent (and there is a
|
||||
single SIGSPEC) or equal to '-', each specified signal's
|
||||
disposition is reset to the value it had when the shell was
|
||||
started. If ACTION is the null string, then the signal specified
|
||||
by each SIGSPEC is ignored by the shell and commands it invokes.
|
||||
|
||||
If a SIGSPEC is '0' or 'EXIT', ARG is executed when the shell
|
||||
exits. If a SIGSPEC is 'DEBUG', the command ARG is executed before
|
||||
every simple command, 'for' command, 'case' command, 'select'
|
||||
command, every arithmetic 'for' command, and before the first
|
||||
command executes in a shell function. Refer to the description of
|
||||
the 'extdebug' option to the 'shopt' builtin (*note The Shopt
|
||||
Builtin::) for details of its effect on the 'DEBUG' trap. If a
|
||||
SIGSPEC is 'RETURN', the command ARG is executed each time a shell
|
||||
function or a script executed with the '.' or 'source' builtins
|
||||
finishes executing.
|
||||
If no arguments are supplied, 'trap' prints the actions associated
|
||||
with each trapped signal as a set of 'trap' commands that can be
|
||||
reused as shell input to restore the current signal dispositions.
|
||||
If ACTION is not present and '-p' has been supplied, 'trap'
|
||||
displays the trap commands associated with each SIGSPEC, or, if no
|
||||
SIGSPECs are supplied, for all trapped signals, as a set of 'trap'
|
||||
commands that can be reused as shell input to restore the current
|
||||
signal dispositions.
|
||||
|
||||
If a SIGSPEC is 'ERR', the command ARG is executed whenever a
|
||||
pipeline (which may consist of a single simple command), a list, or
|
||||
a compound command returns a non-zero exit status, subject to the
|
||||
The '-l' option causes 'trap' to print a list of signal names and
|
||||
their corresponding numbers. Each SIGSPEC is either a signal name
|
||||
or a signal number. Signal names are case insensitive and the
|
||||
'SIG' prefix is optional.
|
||||
|
||||
If a SIGSPEC is '0' or 'EXIT', ACTION is executed when the shell
|
||||
exits. If a SIGSPEC is 'DEBUG', ACTION is executed before every
|
||||
simple command, 'for' command, 'case' command, 'select' command, ((
|
||||
arithmetic command, [[ conditional command, arithmetic 'for'
|
||||
command, and before the first command executes in a shell function.
|
||||
Refer to the description of the 'extdebug' option to the 'shopt'
|
||||
builtin (*note The Shopt Builtin::) for details of its effect on
|
||||
the 'DEBUG' trap. If a SIGSPEC is 'RETURN', ACTION is executed
|
||||
each time a shell function or a script executed with the '.' or
|
||||
'source' builtins finishes executing.
|
||||
|
||||
If a SIGSPEC is 'ERR', ACTION is executed whenever a pipeline
|
||||
(which may consist of a single simple command), a list, or a
|
||||
compound command returns a non-zero exit status, subject to the
|
||||
following conditions. The 'ERR' trap is not executed if the failed
|
||||
command is part of the command list immediately following an
|
||||
'until' or 'while' keyword, part of the test following the 'if' or
|
||||
@@ -3603,10 +3609,11 @@ standard.
|
||||
status is being inverted using '!'. These are the same conditions
|
||||
obeyed by the 'errexit' ('-e') option.
|
||||
|
||||
Signals ignored upon entry to the shell cannot be trapped or reset.
|
||||
Trapped signals that are not being ignored are reset to their
|
||||
original values in a subshell or subshell environment when one is
|
||||
created.
|
||||
Signals ignored upon entry to a non-interactive shell cannot be
|
||||
trapped or reset. Interactive shells permit trapping signals
|
||||
ignored on entry. Trapped signals that are not being ignored are
|
||||
reset to their original values in a subshell or subshell
|
||||
environment when one is created.
|
||||
|
||||
The return status is zero unless a SIGSPEC does not specify a valid
|
||||
signal.
|
||||
@@ -7190,8 +7197,9 @@ startup files.
|
||||
handler for a given signal to the original disposition, they should
|
||||
use '-' as the first argument.
|
||||
|
||||
42. 'trap -p' displays signals whose dispositions are set to SIG_DFL
|
||||
and those that were ignored when the shell started.
|
||||
42. 'trap -p' without arguments displays signals whose dispositions
|
||||
are set to SIG_DFL and those that were ignored when the shell
|
||||
started, not just trapped signals.
|
||||
|
||||
43. The '.' and 'source' builtins do not search the current directory
|
||||
for the filename argument if it is not found by searching 'PATH'.
|
||||
@@ -10887,10 +10895,11 @@ of Bash. The latest version of Bash is always available for FTP from
|
||||
<http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz>.
|
||||
|
||||
Once you have determined that a bug actually exists, use the
|
||||
'bashbug' command to submit a bug report. If you have a fix, you are
|
||||
encouraged to mail that as well! Suggestions and 'philosophical' bug
|
||||
reports may be mailed to <bug-bash@gnu.org> or posted to the Usenet
|
||||
newsgroup 'gnu.bash.bug'.
|
||||
'bashbug' command to submit a bug report or use the form at the <a
|
||||
href="https://savannah.gnu.org/projects/bash/">Bash project page</a>.
|
||||
If you have a fix, you are encouraged to submit that as well!
|
||||
Suggestions and 'philosophical' bug reports may be mailed to
|
||||
<bug-bash@gnu.org> or <help-bash@gnu.org>.
|
||||
|
||||
All bug reports should include:
|
||||
* The version number of Bash.
|
||||
@@ -11867,10 +11876,10 @@ D.1 Index of Shell Builtin Commands
|
||||
* typeset: Bash Builtins. (line 631)
|
||||
* ulimit: Bash Builtins. (line 637)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 415)
|
||||
(line 422)
|
||||
* unalias: Bash Builtins. (line 743)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 433)
|
||||
(line 440)
|
||||
* wait: Job Control Builtins.
|
||||
(line 76)
|
||||
|
||||
@@ -12534,138 +12543,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top896
|
||||
Node: Introduction2815
|
||||
Node: What is Bash?3028
|
||||
Node: What is a shell?4139
|
||||
Node: Definitions6674
|
||||
Node: Basic Shell Features9622
|
||||
Node: Shell Syntax10838
|
||||
Node: Shell Operation11861
|
||||
Node: Quoting13151
|
||||
Node: Escape Character14452
|
||||
Node: Single Quotes14934
|
||||
Node: Double Quotes15279
|
||||
Node: ANSI-C Quoting16554
|
||||
Node: Locale Translation17861
|
||||
Node: Creating Internationalized Scripts19169
|
||||
Node: Comments23283
|
||||
Node: Shell Commands23898
|
||||
Node: Reserved Words24833
|
||||
Node: Simple Commands25586
|
||||
Node: Pipelines26237
|
||||
Node: Lists29233
|
||||
Node: Compound Commands31025
|
||||
Node: Looping Constructs32034
|
||||
Node: Conditional Constructs34526
|
||||
Node: Command Grouping49011
|
||||
Node: Coprocesses50486
|
||||
Node: GNU Parallel53146
|
||||
Node: Shell Functions54060
|
||||
Node: Shell Parameters61942
|
||||
Node: Positional Parameters66327
|
||||
Node: Special Parameters67226
|
||||
Node: Shell Expansions70437
|
||||
Node: Brace Expansion72561
|
||||
Node: Tilde Expansion75292
|
||||
Node: Shell Parameter Expansion77910
|
||||
Node: Command Substitution96258
|
||||
Node: Arithmetic Expansion97610
|
||||
Node: Process Substitution98575
|
||||
Node: Word Splitting99692
|
||||
Node: Filename Expansion101633
|
||||
Node: Pattern Matching104379
|
||||
Node: Quote Removal109378
|
||||
Node: Redirections109670
|
||||
Node: Executing Commands119327
|
||||
Node: Simple Command Expansion119994
|
||||
Node: Command Search and Execution122101
|
||||
Node: Command Execution Environment124476
|
||||
Node: Environment127508
|
||||
Node: Exit Status129168
|
||||
Node: Signals130949
|
||||
Node: Shell Scripts134395
|
||||
Node: Shell Builtin Commands137419
|
||||
Node: Bourne Shell Builtins139454
|
||||
Node: Bash Builtins160917
|
||||
Node: Modifying Shell Behavior191770
|
||||
Node: The Set Builtin192112
|
||||
Node: The Shopt Builtin202710
|
||||
Node: Special Builtins218619
|
||||
Node: Shell Variables219595
|
||||
Node: Bourne Shell Variables220029
|
||||
Node: Bash Variables222130
|
||||
Node: Bash Features254942
|
||||
Node: Invoking Bash255952
|
||||
Node: Bash Startup Files261962
|
||||
Node: Interactive Shells267090
|
||||
Node: What is an Interactive Shell?267498
|
||||
Node: Is this Shell Interactive?268144
|
||||
Node: Interactive Shell Behavior268956
|
||||
Node: Bash Conditional Expressions272582
|
||||
Node: Shell Arithmetic277221
|
||||
Node: Aliases280162
|
||||
Node: Arrays282772
|
||||
Node: The Directory Stack289160
|
||||
Node: Directory Stack Builtins289941
|
||||
Node: Controlling the Prompt294198
|
||||
Node: The Restricted Shell297160
|
||||
Node: Bash POSIX Mode299767
|
||||
Node: Shell Compatibility Mode311682
|
||||
Node: Job Control320246
|
||||
Node: Job Control Basics320703
|
||||
Node: Job Control Builtins325702
|
||||
Node: Job Control Variables331494
|
||||
Node: Command Line Editing332647
|
||||
Node: Introduction and Notation334315
|
||||
Node: Readline Interaction335935
|
||||
Node: Readline Bare Essentials337123
|
||||
Node: Readline Movement Commands338909
|
||||
Node: Readline Killing Commands339866
|
||||
Node: Readline Arguments341784
|
||||
Node: Searching342825
|
||||
Node: Readline Init File345008
|
||||
Node: Readline Init File Syntax346266
|
||||
Node: Conditional Init Constructs369849
|
||||
Node: Sample Init File374042
|
||||
Node: Bindable Readline Commands377163
|
||||
Node: Commands For Moving378364
|
||||
Node: Commands For History380412
|
||||
Node: Commands For Text385403
|
||||
Node: Commands For Killing389049
|
||||
Node: Numeric Arguments392079
|
||||
Node: Commands For Completion393215
|
||||
Node: Keyboard Macros397403
|
||||
Node: Miscellaneous Commands398088
|
||||
Node: Readline vi Mode404030
|
||||
Node: Programmable Completion404934
|
||||
Node: Programmable Completion Builtins412711
|
||||
Node: A Programmable Completion Example423460
|
||||
Node: Using History Interactively428705
|
||||
Node: Bash History Facilities429386
|
||||
Node: Bash History Builtins432388
|
||||
Node: History Interaction437409
|
||||
Node: Event Designators441026
|
||||
Node: Word Designators442377
|
||||
Node: Modifiers444134
|
||||
Node: Installing Bash445939
|
||||
Node: Basic Installation447073
|
||||
Node: Compilers and Options450792
|
||||
Node: Compiling For Multiple Architectures451530
|
||||
Node: Installation Names453219
|
||||
Node: Specifying the System Type455325
|
||||
Node: Sharing Defaults456039
|
||||
Node: Operation Controls456709
|
||||
Node: Optional Features457664
|
||||
Node: Reporting Bugs468880
|
||||
Node: Major Differences From The Bourne Shell470152
|
||||
Node: GNU Free Documentation License486998
|
||||
Node: Indexes512172
|
||||
Node: Builtin Index512623
|
||||
Node: Reserved Word Index519447
|
||||
Node: Variable Index521892
|
||||
Node: Function Index538663
|
||||
Node: Concept Index552444
|
||||
Node: Top892
|
||||
Node: Introduction2807
|
||||
Node: What is Bash?3020
|
||||
Node: What is a shell?4131
|
||||
Node: Definitions6666
|
||||
Node: Basic Shell Features9614
|
||||
Node: Shell Syntax10830
|
||||
Node: Shell Operation11853
|
||||
Node: Quoting13143
|
||||
Node: Escape Character14444
|
||||
Node: Single Quotes14926
|
||||
Node: Double Quotes15271
|
||||
Node: ANSI-C Quoting16546
|
||||
Node: Locale Translation17853
|
||||
Node: Creating Internationalized Scripts19161
|
||||
Node: Comments23275
|
||||
Node: Shell Commands23890
|
||||
Node: Reserved Words24825
|
||||
Node: Simple Commands25578
|
||||
Node: Pipelines26229
|
||||
Node: Lists29225
|
||||
Node: Compound Commands31017
|
||||
Node: Looping Constructs32026
|
||||
Node: Conditional Constructs34518
|
||||
Node: Command Grouping49003
|
||||
Node: Coprocesses50478
|
||||
Node: GNU Parallel53138
|
||||
Node: Shell Functions54052
|
||||
Node: Shell Parameters61934
|
||||
Node: Positional Parameters66319
|
||||
Node: Special Parameters67218
|
||||
Node: Shell Expansions70429
|
||||
Node: Brace Expansion72553
|
||||
Node: Tilde Expansion75284
|
||||
Node: Shell Parameter Expansion77902
|
||||
Node: Command Substitution96251
|
||||
Node: Arithmetic Expansion97603
|
||||
Node: Process Substitution98568
|
||||
Node: Word Splitting99685
|
||||
Node: Filename Expansion101626
|
||||
Node: Pattern Matching104372
|
||||
Node: Quote Removal109371
|
||||
Node: Redirections109663
|
||||
Node: Executing Commands119320
|
||||
Node: Simple Command Expansion119987
|
||||
Node: Command Search and Execution122094
|
||||
Node: Command Execution Environment124469
|
||||
Node: Environment127501
|
||||
Node: Exit Status129161
|
||||
Node: Signals130942
|
||||
Node: Shell Scripts134388
|
||||
Node: Shell Builtin Commands137412
|
||||
Node: Bourne Shell Builtins139447
|
||||
Node: Bash Builtins161229
|
||||
Node: Modifying Shell Behavior192082
|
||||
Node: The Set Builtin192424
|
||||
Node: The Shopt Builtin203022
|
||||
Node: Special Builtins218931
|
||||
Node: Shell Variables219907
|
||||
Node: Bourne Shell Variables220341
|
||||
Node: Bash Variables222442
|
||||
Node: Bash Features255254
|
||||
Node: Invoking Bash256264
|
||||
Node: Bash Startup Files262274
|
||||
Node: Interactive Shells267402
|
||||
Node: What is an Interactive Shell?267810
|
||||
Node: Is this Shell Interactive?268456
|
||||
Node: Interactive Shell Behavior269268
|
||||
Node: Bash Conditional Expressions272894
|
||||
Node: Shell Arithmetic277533
|
||||
Node: Aliases280474
|
||||
Node: Arrays283084
|
||||
Node: The Directory Stack289472
|
||||
Node: Directory Stack Builtins290253
|
||||
Node: Controlling the Prompt294510
|
||||
Node: The Restricted Shell297472
|
||||
Node: Bash POSIX Mode300079
|
||||
Node: Shell Compatibility Mode312043
|
||||
Node: Job Control320607
|
||||
Node: Job Control Basics321064
|
||||
Node: Job Control Builtins326063
|
||||
Node: Job Control Variables331855
|
||||
Node: Command Line Editing333008
|
||||
Node: Introduction and Notation334676
|
||||
Node: Readline Interaction336296
|
||||
Node: Readline Bare Essentials337484
|
||||
Node: Readline Movement Commands339270
|
||||
Node: Readline Killing Commands340227
|
||||
Node: Readline Arguments342145
|
||||
Node: Searching343186
|
||||
Node: Readline Init File345369
|
||||
Node: Readline Init File Syntax346627
|
||||
Node: Conditional Init Constructs370210
|
||||
Node: Sample Init File374403
|
||||
Node: Bindable Readline Commands377524
|
||||
Node: Commands For Moving378725
|
||||
Node: Commands For History380773
|
||||
Node: Commands For Text385764
|
||||
Node: Commands For Killing389410
|
||||
Node: Numeric Arguments392440
|
||||
Node: Commands For Completion393576
|
||||
Node: Keyboard Macros397764
|
||||
Node: Miscellaneous Commands398449
|
||||
Node: Readline vi Mode404391
|
||||
Node: Programmable Completion405295
|
||||
Node: Programmable Completion Builtins413072
|
||||
Node: A Programmable Completion Example423821
|
||||
Node: Using History Interactively429066
|
||||
Node: Bash History Facilities429747
|
||||
Node: Bash History Builtins432749
|
||||
Node: History Interaction437770
|
||||
Node: Event Designators441387
|
||||
Node: Word Designators442738
|
||||
Node: Modifiers444495
|
||||
Node: Installing Bash446300
|
||||
Node: Basic Installation447434
|
||||
Node: Compilers and Options451153
|
||||
Node: Compiling For Multiple Architectures451891
|
||||
Node: Installation Names453580
|
||||
Node: Specifying the System Type455686
|
||||
Node: Sharing Defaults456400
|
||||
Node: Operation Controls457070
|
||||
Node: Optional Features458025
|
||||
Node: Reporting Bugs469241
|
||||
Node: Major Differences From The Bourne Shell470582
|
||||
Node: GNU Free Documentation License487428
|
||||
Node: Indexes512602
|
||||
Node: Builtin Index513053
|
||||
Node: Reserved Word Index519877
|
||||
Node: Variable Index522322
|
||||
Node: Function Index539093
|
||||
Node: Concept Index552874
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user