The missing patch is in the attachment.
--- bash.1 2023-09-24 04:48:42.000000000 +0000 +++ bash.1.new 2023-09-24 15:31:04.000000000 +0000 @@ -530,8 +530,15 @@ command (only \fBin\fP and \fBdo\fP are .if t .RS .PP .B -.if n ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] -.if t ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] +.if n ! case coproc do done elif else esac fi for function if in \ +select then until while { } time [[ ]] +.if t \{\ +. lg 0\" No ligature for 'fi' +! case coproc do done elif else esac fi \ + for function if in select then until while { \ + } time [[ ]] +. lg 1 +.\} .if t .RE .SH "SHELL GRAMMAR" This section describes the syntax of the various forms of shell commands. @@ -553,7 +560,8 @@ or \fB|&\fP. The format for a pipeline is: .RS .PP -[\fBtime\fP [\fB\-p\fP]] [ ! ] \fIcommand1\fP [ [\fB|\fP\(bv\fB|&\fP] \fIcommand2\fP ... ] +[\fBtime\fP [\fB\-p\fP]] [ ! ] \fIcommand1\fP [ [\fB|\fP\(bv\fB|&\fP] \ +\fIcommand2\fP ... ] .RE .PP The standard output of @@ -752,7 +760,7 @@ When used with \fB[[\fP, the \fB<\fP and lexicographically using the current locale. .PP See the description of the \fItest\fP builtin command (section SHELL -BUILTIN COMMANDS below) for the handling of parameters (i.e. +BUILTIN COMMANDS below) for the handling of parameters (i.e., missing parameters). .if t .sp 0.5 .if n .sp 1 @@ -860,7 +868,8 @@ operators do not evaluate \fIexpression2 the entire conditional expression. .RE .TP -\fBfor\fP \fIname\fP [ [ \fBin\fP [ \fIword ...\fP ] ] ; ] \fBdo\fP \fIlist\fP ; \fBdone\fP +\fBfor\fP \fIname\fP [ [ \fBin\fP [ \fIword ...\fP ] ] ; ] \fBdo\fP \ +\fIlist\fP ; \fBdone\fP The list of words following \fBin\fP is expanded, generating a list of items. The variable \fIname\fP is set to each element of this list @@ -874,7 +883,8 @@ The return status is the exit status of If the expansion of the items following \fBin\fP results in an empty list, no commands are executed, and the return status is 0. .TP -\fBfor\fP (( \fIexpr1\fP ; \fIexpr2\fP ; \fIexpr3\fP )) ; \fBdo\fP \fIlist\fP ; \fBdone\fP +\fBfor\fP (( \fIexpr1\fP ; \fIexpr2\fP ; \fIexpr3\fP )) ; \fBdo\fP \ +\fIlist\fP ; \fBdone\fP First, the arithmetic expression \fIexpr1\fP is evaluated according to the rules described below under .SM @@ -1270,7 +1280,7 @@ See the description of .B shopt below under .SM -.BR SHELL BUILTIN COMMANDS . +.BR "SHELL BUILTIN COMMANDS" . .SH PARAMETERS A .I parameter @@ -1374,8 +1384,8 @@ For instance, if a variable name is pass argument, running .sp .5 .RS -.if t \f(CWdeclare -n ref=$1\fP -.if n declare -n ref=$1 +.if t \f(CWdeclare \-n ref=$1\fP +.if n declare \-n ref=$1 .RE .sp .5 inside the function creates a nameref variable \fBref\fP whose value is @@ -1662,7 +1672,7 @@ was invoked. \fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the source file (\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP) where \fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called -(or \fB${BASH_LINENO[\fP\fI$i-1\fP\fB]}\fP if referenced within another +(or \fB${BASH_LINENO[\fP\fI$i\-1\fP\fB]}\fP if referenced within another shell function). Use .SM @@ -1991,7 +2001,7 @@ between 0 and 32767. Assigning a value to .SM -.BR RANDOM +.B RANDOM initializes (seeds) the sequence of random numbers. If .SM @@ -2001,8 +2011,8 @@ subsequently reset. .TP .B READLINE_ARGUMENT Any numeric argument given to a readline command that was defined using -.if t \f(CWbind -x\fP -.if n "bind -x" +.if t \f(CWbind \-x\fP +.if n "bind \-x" (see .SM .B "SHELL BUILTIN COMMANDS" @@ -2013,8 +2023,8 @@ when it was invoked. The contents of the .B readline line buffer, for use with -.if t \f(CWbind -x\fP -.if n "bind -x" +.if t \f(CWbind \-x\fP +.if n "bind \-x" (see .SM .B "SHELL BUILTIN COMMANDS" @@ -2024,8 +2034,8 @@ below). The position of the mark (saved insertion point) in the .B readline line buffer, for use with -.if t \f(CWbind -x\fP -.if n "bind -x" +.if t \f(CWbind \-x\fP +.if n "bind \-x" (see .SM .B "SHELL BUILTIN COMMANDS" @@ -2037,8 +2047,8 @@ called the \fIregion\fP. The position of the insertion point in the .B readline line buffer, for use with -.if t \f(CWbind -x\fP -.if n "bind -x" +.if t \f(CWbind \-x\fP +.if n "bind \-x" (see .SM .B "SHELL BUILTIN COMMANDS" @@ -2157,8 +2167,8 @@ is not used to search for the resultant .B BASH_XTRACEFD If set to an integer corresponding to a valid file descriptor, \fBbash\fP will write the trace output generated when -.if t \f(CWset -x\fP -.if n \fIset -x\fP +.if t \f(CWset \-x\fP +.if n \fIset \-x\fP is enabled to that file descriptor. The file descriptor is closed when .SM @@ -2565,7 +2575,7 @@ not already set. If this variable is set, and is an array, the value of each set element is executed as a command prior to issuing each primary prompt. -If this is set but not an array variable, +If this is set but not an array variable, its value is used as a command to execute instead. .TP .B PROMPT_DIRTRIM @@ -2853,7 +2863,7 @@ array, and an index of \-1 references th .PP Referencing an array variable without a subscript is equivalent to referencing the array with a subscript of 0. -Any reference to a variable using a valid subscript is legal, and +Any reference to a variable using a valid subscript is valid, and .B bash will create an array if necessary. .PP @@ -3406,7 +3416,7 @@ The match is performed using the rules d .B Pattern Matching below. In the first form above, only the first match is replaced. -If there are two slashes separating \fIparameter\fP and \fIpattern\fP +If there are two slashes separating \fIparameter\fP and \fIpattern\fP (the second form above), all matches of \fIpattern\fP are replaced with \fIstring\fP. If \fIpattern\fP is preceded by \fB#\fP (the third form above), @@ -3787,7 +3797,7 @@ of alphabetic characters. Note that when using range expressions like [a-z] (see below), letters of the other case may be included, depending on the setting of -.B LC_COLLATE. +.BR LC_COLLATE . When a pattern is used for pathname expansion, the character .B ``.'' @@ -3949,7 +3959,6 @@ A .B ] may be matched by including it as the first character in the set. -.br .if t .sp 0.5 .if n .sp 1 Within @@ -3962,12 +3971,13 @@ following classes defined in the POSIX s .PP .RS .B -.if n alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit -.if t alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit +.if n alnum alpha ascii blank cntrl digit graph lower print punct \ +space upper word xdigit +.if t alnum alpha ascii blank cntrl digit graph lower \ +print punct space upper word xdigit .br A character class matches any character belonging to that class. The \fBword\fP character class matches letters, digits, and the character _. -.br .if t .sp 0.5 .if n .sp 1 Within @@ -3978,7 +3988,6 @@ an \fIequivalence class\fP can be specif \fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the same collation weight (as defined by the current locale) as the character \fIc\fP. -.br .if t .sp 0.5 .if n .sp 1 Within @@ -5330,7 +5339,7 @@ same process group as the terminal, and .B SIGINT to all processes in that process group. .PP -When \fBbash\fP is running without job control enabled and receives +When \fBbash\fP is running without job control enabled and receives .SM .B SIGINT while waiting for a foreground command, it waits until that foreground @@ -5995,7 +6004,7 @@ The variables and their default values a .PP .PD 0 .TP -.B active\-region\-start\-color +.B active\-region\-start\-color A string variable that controls the text color and background when displaying the text in the active region (see the description of \fBenable\-active\-region\fP below). @@ -6007,8 +6016,9 @@ The default value is the string that put as obtained from the terminal's terminfo description. A sample value might be \f(CW"\ee[01;33m"\fP. .TP -.B active\-region\-end\-color -A string variable that "undoes" the effects of \fBactive\-region\-start\-color\fP +.B active\-region\-end\-color +A string variable that "undoes" the effects of +\fBactive\-region\-start\-color\fP and restores "normal" terminal display appearance after displaying text in the active region. This string must not take up any physical character positions on the display, @@ -6101,7 +6111,7 @@ by stripping the eighth bit and prefixin escape character (in effect, using escape as the \fImeta prefix\fP). The default is \fIOn\fP, but readline will set it to \fIOff\fP if the locale contains eight-bit characters. -This variable is dependent on the \fBLC_CTYPE\fP locale category, and +This variable is dependent on the \fBLC_CTYPE\fP locale category, and may change if the locale is changed. .TP .B disable\-completion (Off) @@ -6134,11 +6144,11 @@ non-printing characters, which can be us sequence into the mode string. .TP .B enable\-active\-region (On) -The \fIpoint\fP is the current cursor position, and \fImark\fP refers -to a saved cursor position. -The text between the point and mark is referred to as the \fIregion\fP. +The \fIpoint\fP is the current cursor position, and \fImark\fP refers +to a saved cursor position. +The text between the point and mark is referred to as the \fIregion\fP. When this variable is set to \fIOn\fP, readline allows certain commands -to designate the region as \fIactive\fP. +to designate the region as \fIactive\fP. When the region is active, readline highlights the text in the region using the value of the \fBactive\-region\-start\-color\fP, which defaults to the string that enables @@ -6197,7 +6207,7 @@ regardless of what the terminal claims i is a synonym for this variable. The default is \fIOff\fP, but readline will set it to \fIOn\fP if the locale contains eight-bit characters. -This variable is dependent on the \fBLC_CTYPE\fP locale category, and +This variable is dependent on the \fBLC_CTYPE\fP locale category, and may change if the locale is changed. .TP .B isearch\-terminators (``C\-[C\-J'') @@ -6262,7 +6272,7 @@ eighth bit set directly rather than as a sequence. The default is \fIOff\fP, but readline will set it to \fIOn\fP if the locale contains eight-bit characters. -This variable is dependent on the \fBLC_CTYPE\fP locale category, and +This variable is dependent on the \fBLC_CTYPE\fP locale category, and may change if the locale is changed. .TP .B page\-completions (On) @@ -6347,7 +6357,7 @@ The construct allows bindings to be made based on the editing mode, the terminal being used, or the application using readline. The text of the test, after any comparison operator, - extends to the end of the line; +extends to the end of the line; unless otherwise noted, no characters are required to isolate it. .RS .IP \fBmode\fP @@ -7285,7 +7295,7 @@ completion function would load completio .br } .br -complete -D -F _completion_loader -o bashdefault -o default +complete \-D \-F _completion_loader \-o bashdefault \-o default .br \fP .SH HISTORY @@ -7905,7 +7915,7 @@ and .B READLINE_MARK variables to the current location of the insertion point and the saved insertion point (the mark), respectively. -The shell assigns any numeric argument the user supplied to the +The shell assigns any numeric argument the user supplied to the .SM .B READLINE_ARGUMENT variable. @@ -8105,9 +8115,13 @@ will be displayed. The return value is true unless an invalid option is supplied, or no matches were generated. .TP -\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] +\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] \ +[\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] \ +[\fB\-W\fP \fIwordlist\fP] .br -[\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] [\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP] +[\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] [\fB\-X\fP \ +\fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \ +\fIname\fP [\fIname ...\fP] .PD 0 .TP \fBcomplete\fP \fB\-pr\fP [\fB\-DEI\fP] [\fIname\fP ...] @@ -8414,7 +8428,7 @@ It is ignored in all other cases. The .B \-I option causes local variables to inherit the attributes -(except the \fInameref\fP attribute) +(except the \fInameref\fP attribute) and value of any existing variable with the same \fIname\fP at a surrounding scope. If there is no existing variable, the local variable is initially unset. @@ -8672,8 +8686,8 @@ binary found via the .SM .B PATH instead of the shell builtin version, run -.if t \f(CWenable -n test\fP. -.if n ``enable -n test''. +.if t \f(CWenable \-n test\fP. +.if n ``enable \-n test''. The .B \-f option means to load the new builtin command @@ -8702,7 +8716,7 @@ If no options are supplied and a \fIname \fBenable\fP will attempt to load \fIname\fP from a shared object named \fIname\fP, as if the command were .if t \f(CWenable \-f\fP \fIname name\fP . -.if n ``enable -f \fIname name\fP . +.if n ``enable \-f \fIname name\fP . The return value is 0 unless a .I name is not a shell builtin or there is an error loading a new builtin @@ -8872,7 +8886,7 @@ In the second form, \fIcommand\fP is re- of \fIpat\fP is replaced by \fIrep\fP. \fICommand\fP is interpreted the same as \fIfirst\fP above. A useful alias to use with this is -.if n ``r="fc -s"'', +.if n ``r="fc \-s"'', .if t \f(CWr='fc \-s'\fP, so that typing .if n ``r cc'' @@ -9131,7 +9145,7 @@ Delete the history entry at position \fI If \fIoffset\fP is negative, it is interpreted as relative to one greater than the last history position, so negative indices count back from the end of the history, and an index of \-1 refers to the current -\fBhistory -d\fP command. +\fBhistory \-d\fP command. .TP \fB\-d\fP \fIstart\fP\-\fIend\fP Delete the range of history entries between positions \fIstart\fP and @@ -9242,7 +9256,8 @@ passing it returning its exit status. .RE .TP -\fBkill\fP [\fB\-s\fP \fIsigspec\fP | \fB\-n\fP \fIsignum\fP | \fB\-\fP\fIsigspec\fP] [\fIpid\fP | \fIjobspec\fP] ... +\fBkill\fP [\fB\-s\fP \fIsigspec\fP | \fB\-n\fP \fIsignum\fP | \ +\fB\-\fP\fIsigspec\fP] [\fIpid\fP | \fIjobspec\fP] ... .PD 0 .TP \fBkill\fP \fB\-l\fP|\fB\-L\fP [\fIsigspec\fP | \fIexit_status\fP] @@ -9445,16 +9460,16 @@ Removes the \fIn\fPth entry counting fro shown by .BR dirs , starting with zero. For example: -.if n ``popd -0'' -.if t \f(CWpopd -0\fP +.if n ``popd \-0'' +.if t \f(CWpopd \-0\fP removes the last directory, -.if n ``popd -1'' -.if t \f(CWpopd -1\fP +.if n ``popd \-1'' +.if t \f(CWpopd \-1\fP the next to last. .PD .PP If the top element of the directory stack is modified, and -the \fI-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP +the \fI\-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP builtin to change to the directory at the top of the stack. If the \fBcd\fP fails, \fBpopd\fP returns a non-zero value. .PP @@ -9604,7 +9619,10 @@ The return status is 0 unless an error o reading the name of the current directory or an invalid option is supplied. .TP -\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-N\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...] +\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \ +\fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-N\fP \ +\fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] \ +[\fB\-u\fP \fIfd\fP] [\fIname\fP ...] One line is read from the standard input, or from the file descriptor \fIfd\fP supplied as an argument to the \fB\-u\fP option, split into words as described @@ -9810,10 +9828,12 @@ function and not during execution of a s Any command associated with the \fBRETURN\fP trap is executed before execution resumes after the function or script. .TP -\fBset\fP [\fB\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\-name\fP] [\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...] +\fBset\fP [\fB\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\-name\fP] \ +[\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...] .PD 0 .TP -\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\-name\fP] [\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...] +\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\-name\fP] \ +[\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...] .PD Without options, display the name and value of each shell variable in a format that can be reused as input @@ -10785,7 +10805,7 @@ Return a status of 0 (true) or 1 (false) the evaluation of the conditional expression .IR expr . Each operator and operand must be a separate argument. -Expressions are composed of the primaries described +Expressions are composed of the primaries described .ie \n(zZ=1 in \fIbash(1)\fP .el above under @@ -11052,8 +11072,8 @@ that would be executed if .I name were specified as a command name, or nothing if -.if t \f(CWtype -t name\fP -.if n ``type -t name'' +.if t \f(CWtype \-t name\fP +.if n ``type \-t name'' would not return .IR file . The @@ -11062,8 +11082,8 @@ option forces a .SM .B PATH search for each \fIname\fP, even if -.if t \f(CWtype -t name\fP -.if n ``type -t name'' +.if t \f(CWtype \-t name\fP +.if n ``type \-t name'' would not return .IR file . If a command is hashed, @@ -11377,7 +11397,7 @@ specified as a set of options to the sho .BR compat41 , and so on). There is only one current -compatibility level -- each option is mutually exclusive. +compatibility level \(en each option is mutually exclusive. The compatibility level is intended to allow users to select behavior from previous versions that is incompatible with newer versions while they migrate scripts to use current features and @@ -11386,7 +11406,7 @@ behavior. It's intended to be a temporar This section does not mention behavior that is standard for a particular version (e.g., setting \fBcompat32\fP means that quoting the rhs of the regexp matching operator quotes special regexp characters in the word, which is -default behavior in bash-3.2 and subsequent versions). +default behavior in bash-3.2 and subsequent versions). .PP If a user enables, say, \fBcompat32\fP, it may affect the behavior of other compatibility levels up to and including the current compatibility level. @@ -11506,7 +11526,7 @@ are not special within double-quoted wor .IP \(bu the shell does not print a warning message if an attempt is made to use a quoted compound assignment as an argument to declare -(e.g., declare -a foo=\(aq(1 2)\(aq). Later versions warn that this usage is +(e.g., declare \-a foo=\(aq(1 2)\(aq). Later versions warn that this usage is deprecated .IP \(bu word expansion errors are considered non-fatal errors that cause the @@ -11660,7 +11680,7 @@ option to the builtin command .IP \(bu turning off restricted mode with -\fBset +r\fP or \fBshopt -u restricted_shell\fP. +\fBset +r\fP or \fBshopt \-u restricted_shell\fP. .PP These restrictions are enforced after any startup files are read. .PP @@ -11670,7 +11690,7 @@ These restrictions are enforced after an .SM .B "COMMAND EXECUTION" above), -\} +.\} .B rbash turns off any restrictions in the shell spawned to execute the script. @@ -11685,10 +11705,10 @@ script. .TP \fIThe Gnu History Library\fP, Brian Fox and Chet Ramey .TP -\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE -- -http://pubs.opengroup.org/onlinepubs/9699919799/ +\fIPortable Operating System Interface (POSIX) Part 2: Shell and \ +Utilities\fP, IEEE \(en http://pubs.opengroup.org/onlinepubs/9699919799/ .TP -http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode +http://tiswww.case.edu/~chet/bash/POSIX \(en a description of posix mode .TP \fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1) .TP @@ -11737,7 +11757,7 @@ Chet Ramey, Case Western Reserve Univers chet.ra...@case.edu .SH BUG REPORTS If you find a bug in -.B bash, +.BR bash , you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of