When SHELL BUILTIN COMMANDS section from bash.1 is included into builtins.1, references to other sections in bash.1 become invalid.
This patch adds conditions to make those references refer to bash(1) in case builtins.1 man page is viewed. Signed-off-by: Nikola Forró <nfo...@redhat.com> --- doc/bash.1 | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 161 insertions(+), 33 deletions(-) diff --git a/doc/bash.1 b/doc/bash.1 index ec41462..5b2c137 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -7193,7 +7193,12 @@ apply to ``empty'' command completion; that is, completion attempted on a blank line. .sp 1 The process of applying these completion specifications when word completion -is attempted is described above under \fBProgrammable Completion\fP. +is attempted is described +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +under \fBProgrammable Completion\fP. .sp 1 Other options, if specified, have the following meanings. The arguments to the \fB\-G\fP, \fB\-W\fP, and \fB\-X\fP options @@ -7461,12 +7466,18 @@ to give variables attributes: .B \-a Each \fIname\fP is an indexed array variable (see .B Arrays -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). .TP .B \-A Each \fIname\fP is an associative array variable (see .B Arrays -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). .TP .B \-f Use function names only. @@ -7475,7 +7486,11 @@ Use function names only. The variable is treated as an integer; arithmetic evaluation (see .SM .B "ARITHMETIC EVALUATION" -above) is performed when the variable is assigned a value. +.ie \n(zZ=1 \{ in +.BR bash (1)) +\} +.el above) +is performed when the variable is assigned a value. .TP .B \-l When the variable is assigned a value, all upper-case characters are @@ -7537,7 +7552,11 @@ an attempt is made to assign a value to a readonly variable, an attempt is made to assign a value to an array variable without using the compound assignment syntax (see .B Arrays -above), one of the \fInames\fP is not a valid shell variable name, +.ie \n(zZ=1 \{ in +.BR bash (1)), +\} +.el above), +one of the \fInames\fP is not a valid shell variable name, an attempt is made to turn off readonly status for a readonly variable, an attempt is made to turn off array status for an array variable, or an attempt is made to display a non-existent function with \fB\-f\fP. @@ -8290,7 +8309,10 @@ Each is an arithmetic expression to be evaluated (see .SM .B "ARITHMETIC EVALUATION" -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). If the last .I arg evaluates to 0, @@ -8580,7 +8602,12 @@ The characters in .SM .B IFS are used to split the line into words using the same rules the shell -uses for expansion (described above under \fBWord Splitting\fP). +uses for expansion (described +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +under \fBWord Splitting\fP). The backslash character (\fB\e\fP) may be used to remove any special meaning for the next character read and for line continuation. Options, if supplied, have the following meanings: @@ -8607,7 +8634,11 @@ is coming from a terminal, (see .SM .B READLINE -above) is used to obtain the line. +.ie \n(zZ=1 \{ in +.BR bash (1)) +\} +.el above) +is used to obtain the line. Readline uses the current (or default, if line editing was not previously active) editing settings. .TP @@ -8783,7 +8814,11 @@ or a \fIcompound command\fP (see .SM .B SHELL GRAMMAR -above), exits with a non-zero status. +.ie \n(zZ=1 \{ in +.BR bash (1)), +\} +.el above), +exits with a non-zero status. The shell does not exit if the command that fails is part of the command list immediately following a .B while @@ -8811,7 +8846,11 @@ This option applies to the shell environment and each subshell environment separately (see .SM .B "COMMAND EXECUTION ENVIRONMENT" -above), and may cause +.ie \n(zZ=1 \{ in +.BR bash (1)), +\} +.el above), +and may cause subshells to exit before executing all the commands in the subshell. .if t .sp 0.5 .if n .sp 1 @@ -8843,7 +8882,10 @@ by default for interactive shells on systems that support it (see .SM .B JOB CONTROL -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). All processes run in a separate process group. When a background job completes, the shell prints a line containing its exit status. @@ -8894,7 +8936,12 @@ Same as .BR \-H . .TP 8 .B history -Enable command history, as described above under +Enable command history, as described +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +under .SM .BR HISTORY . This option is on by default in interactive shells. @@ -8906,7 +8953,10 @@ The effect is as if the shell command had been executed (see .B Shell Variables -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). .TP 8 .B keyword Same as @@ -8961,7 +9011,11 @@ from the POSIX standard to match the standard (\fIposix mode\fP). See .SM .B "SEE ALSO" -below for a reference to a document that details how posix mode affects +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el below +for a reference to a document that details how posix mode affects bash's behavior. .TP 8 .B privileged @@ -9047,7 +9101,11 @@ or associated word list. .B \-B The shell performs brace expansion (see .B Brace Expansion -above). This is on by default. +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). +This is on by default. .TP 8 .B \-C If set, @@ -9233,7 +9291,11 @@ the exit to be deferred until a second exit is attempted without an intervening command (see .SM .B "JOB CONTROL" -above). The shell always +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). +The shell always postpones exiting if any jobs are stopped. .TP 8 .B checkwinsize @@ -9347,7 +9409,12 @@ builtin command. An interactive shell does not exit if fails. .TP 8 .B expand_aliases -If set, aliases are expanded as described above under +If set, aliases are expanded as described +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +under .SM .BR ALIASES . This option is enabled by default for interactive shells. @@ -9377,7 +9444,11 @@ executed by the \fB.\fP or \fBsource\fP builtins), a call to and .SM .B BASH_ARGV -are updated as described in their descriptions above. +are updated as described in their descriptions +.ie \n(zZ=1 \{ in +.BR bash (1). +\} +.el above. .TP .B 5. Function tracing is enabled: command substitution, shell functions, and @@ -9391,7 +9462,12 @@ subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the .RE .TP 8 .B extglob -If set, the extended pattern matching features described above under +If set, the extended pattern matching features described +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +under \fBPathname Expansion\fP are enabled. .TP 8 .B extquote @@ -9413,7 +9489,11 @@ the ignored words are the only possible completions. See .SM \fBSHELL VARIABLES\fP -above for a description of +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +for a description of .SM .BR FIGNORE . This option is enabled by default. @@ -9422,7 +9502,11 @@ This option is enabled by default. If set, range expressions used in pattern matching bracket expressions (see .SM .B Pattern Matching -above) behave as if in the traditional C locale when performing +.ie \n(zZ=1 \{ in +.BR bash (1)) +\} +.el above) +behave as if in the traditional C locale when performing comparisons. That is, the current locale's collating sequence is not taken into account, so .B b @@ -9471,7 +9555,10 @@ word containing a \fB@\fP is being completed (see under .SM .B READLINE -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). This is enabled by default. .TP 8 .B huponexit @@ -9487,7 +9574,11 @@ to cause that word and all remaining characters on that line to be ignored in an interactive shell (see .SM .B COMMENTS -above). This option is enabled by default. +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). +This option is enabled by default. .TP 8 .B lastpipe If set, and job control is not active, the shell runs the last command of @@ -9503,7 +9594,10 @@ embedded newlines rather than using semicolon separators where possible. The shell sets this option if it is started as a login shell (see .SM .B "INVOCATION" -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). The value may not be changed. .TP 8 .B mailwarn @@ -9528,7 +9622,10 @@ If set, matches filenames in a case\-insensitive fashion when performing pathname expansion (see .B Pathname Expansion -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). .TP 8 .B nocasematch If set, @@ -9542,12 +9639,20 @@ If set, allows patterns which match no files (see .B Pathname Expansion -above) +.ie \n(zZ=1 \{ in +.BR bash (1)) +\} +.el above) to expand to a null string, rather than themselves. .TP 8 .B progcomp If set, the programmable completion facilities (see -\fBProgrammable Completion\fP above) are enabled. +\fBProgrammable Completion\fP +.ie \n(zZ=1 \{ in +.BR bash (1)) +\} +.el above) +are enabled. This option is enabled by default. .TP 8 .B promptvars @@ -9556,13 +9661,20 @@ parameter expansion, command substitution, arithmetic expansion, and quote removal after being expanded as described in .SM .B PROMPTING -above. This option is enabled by default. +.ie \n(zZ=1 \{ in +.BR bash (1). +\} +.el above. +This option is enabled by default. .TP 8 .B restricted_shell The shell sets this option if it is started in restricted mode (see .SM .B "RESTRICTED SHELL" -below). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el below). The value may not be changed. This is not reset when the startup files are executed, allowing the startup files to discover whether or not a shell is restricted. @@ -9606,7 +9718,12 @@ Return a status of 0 (true) or 1 (false) depending on the evaluation of the conditional expression .IR expr . Each operator and operand must be a separate argument. -Expressions are composed of the primaries described above under +Expressions are composed of the primaries described +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above +under .SM .BR "CONDITIONAL EXPRESSIONS" . \fBtest\fP does not accept any options, nor does it accept and ignore @@ -9659,7 +9776,11 @@ The expression is true if and only if the argument is not null. 2 arguments If the first argument is \fB!\fP, the expression is true if and only if the second argument is null. -If the first argument is one of the unary conditional operators listed above +If the first argument is one of the unary conditional operators listed +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above under .SM .BR "CONDITIONAL EXPRESSIONS" , @@ -9669,7 +9790,11 @@ is false. .TP 3 arguments The following conditions are applied in the order listed. -If the second argument is one of the binary conditional operators listed above +If the second argument is one of the binary conditional operators listed +.ie \n(zZ=1 \{ in +.BR bash (1) +\} +.el above under .SM .BR "CONDITIONAL EXPRESSIONS" , @@ -9769,7 +9894,10 @@ is executed before every \fIsimple command\fP, \fIfor\fP command, command, and before the first command executes in a shell function (see .SM .B SHELL GRAMMAR -above). +.ie \n(zZ=1 \{ in +.BR bash (1)). +\} +.el above). Refer to the description of the \fBextdebug\fP option to the \fBshopt\fP builtin for details of its effect on the \fBDEBUG\fP trap. If a -- 2.7.4