do not require leading . for rl color prefix etension; fix for isearch in single-byte locales; next set of doc updates (SIGNALS); add warning for invalid job id; allow function names to be non-identifiers in posix mode

This commit is contained in:
Chet Ramey
2024-10-26 12:39:17 -04:00
parent 474743f2da
commit ee3b91dfd9
33 changed files with 2501 additions and 2264 deletions
+40 -7
View File
@@ -5,14 +5,14 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Sun Oct 20 12:31:15 EDT 2024
.\" Last Change: Wed Oct 23 11:32:05 EDT 2024
.\"
.\" bash_builtins, strip all but Built-Ins section
.\" avoid a warning about an undefined register
.\" .if !rzY .nr zY 0
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2024 October 20" "GNU Bash 5.3"
.TH BASH 1 "2024 October 23" "GNU Bash 5.3"
.\"
.ie \n(.g \{\
.ds ' \(aq
@@ -5791,8 +5791,8 @@ sends a
to all jobs when an interactive login shell exits.
.PP
If \fBbash\fP is waiting for a command to complete and receives a signal
for which a trap has been set, the trap will not be executed until
the command completes.
for which a trap has been set,
it will not execute the trap until the command completes.
If \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP
builtin,
and it receives a signal for which a trap has been set,
@@ -5811,12 +5811,21 @@ same process group as the terminal, and \fB\*^C\fP sends
.SM
.B SIGINT
to all processes in that process group.
Since \fBbash\fP does not enable job control by default when the
shell is not interactive,
this scenario is most common in non-interactive shells.
.PP
When job control is enabled, and \fBbash\fP is waiting for a foreground
command to complete, the shell does not receive keyboard-generated
signals, because it is not in the same process group as the terminal.
This scenario is most common in interactive shells, where \fBbash\fP
attempts to enable job control by default.
See
.SM
.B "JOB CONTROL"
below for more information about process groups.
.PP
When \fBbash\fP is running without job control enabled and receives
When job control is not enabled, and \fBbash\fP receives
.SM
.B SIGINT
while waiting for a foreground command, it waits until that foreground
@@ -5828,13 +5837,18 @@ If the command terminates due to the
.SM
.BR SIGINT ,
\fBbash\fP concludes
that the user meant to end the entire script, and acts on the
that the user meant to send the
.SM
.B SIGINT
to the shell as well, and acts on the
.SM
.B SIGINT
(e.g., by running a
.SM
.B SIGINT
trap or exiting itself);
trap,
exiting a non-interactive shell,
or returning to the top level to read a new command).
.IP 2.
If the command does not terminate due to
.SM
@@ -5859,6 +5873,25 @@ trap set on
as it does with any other trapped signal it
receives while it is waiting for the foreground command to
complete, for compatibility.
.PP
When job control is enabled, \fBbash\fP does not receive keyboard-generated
signals such as
.SM
.B SIGINT
while it is waiting for a foreground command.
An interactive shell does not pay attention to the
.SM
.BR SIGINT ,
even if the foreground command terminates as a result, other than noting
its exit status.
If the shell is not interactive, and
the foreground command terminates due to the
.SM
.BR SIGINT ,
\fBbash\fP pretends it received the
.SM
.B SIGINT
itself (scenario 1 above), for compatibility.
.SH "JOB CONTROL"
.I Job control
refers to the ability to selectively stop (\fIsuspend\fP)