[PATCH 02/18] doc/bash.1: fix bug in new `Q` macro

2024-01-31 Thread G. Branden Robinson
I didn't pay close enough attention to Documenter's Workbench 3.3 troff output when submitting the original version of this macro. Add a necessary backslash to escape the newline at the beginning of a conditional block. This omission was causing DWB to put a blank line on the output every time it

[PATCH 01/18] doc/bash.1: fix rendering error on old *roffs

2024-01-31 Thread G. Branden Robinson
The man(7) in Seventh Edition Unix (1979) accepted at most six arguments to any macro. Documenter's Workbench 3.3 troff retains this limitation, as do at least some System V troffs that survive in commercial Unix (such as Solaris 10 troff). Quote the mulitiplicity of arguments so that they will a

[PATCH 03/18] doc/bash.1: fix latent bug in `QN` macro

2024-01-31 Thread G. Branden Robinson
Whether it arises will depend on word placement and line length. *roff has a simplistic notion of what a "word" is. groff_man_style(7): ... The formatter troff(1) collects words from the input and fills output lines with as many as will fit. Words are separated by spaces and newli

[PATCH 05/18] doc/bash.1: prevent space where undesired

2024-01-31 Thread G. Branden Robinson
groff_man_style(7): \cEnd a text line without inserting space or attempting a break. Normally, if filling is enabled, the end of a text line is treated like a space; an output line may break there (if it does not, troff inserts an adjustabl

[PATCH 04/18] doc/bash.1: improve typography of ellipses

2024-01-31 Thread G. Branden Robinson
Apply ellipsis advice from groff_man_style(7). • The dummy character escape sequence \& follows the ellipsis when further text will follow after space on the output line, keeping its last period from being interpreted as the end of a sentence and causing additional in

[PATCH 06/18] doc/bash.1: fix markup nit

2024-01-31 Thread G. Branden Robinson
Remove trailing whitespace from lines. They shouldn't matter to *roff,[1] but "git diff" shows them as distractingly radioactive. Diff of rendering (Heirloom Doctools, DWB): - referred to as the region. When this variable is set to On, + referred to as the region. When

[PATCH 07/18] doc/bash.1: stop attempting literal ASCII ^ use

2024-01-31 Thread G. Branden Robinson
Almost all other "literal" uses of the caret were already migrated to `\(ha` instead. groff_man_style(7): ... Some escape sequences are however required for correct typesetting even in man pages and usually do not cause portability problems. Several of these render glyphs corr

[PATCH 08/18] doc/bash.1: stop attempting literal ASCII " use

2024-01-31 Thread G. Branden Robinson
Migrate uses of the double quote (U+0022) as a literal to \(dq special character escape sequence. Generally these weren't _wrong_, but the man page author then has to remember that they change their meaning when they are placed inside macro arguments. groff_man_style(7): ... Some escape sequ

[PATCH 09/18] doc/bash.1: stop attempting literal ASCII ' use

2024-01-31 Thread G. Branden Robinson
Almost all other "literal" uses of the apostrophe were already migrated to `\(aq` instead. groff_man_style(7): ... Some escape sequences are however required for correct typesetting even in man pages and usually do not cause portability problems. Several of these render glyphs

[PATCH 10/18] doc/bash.1: completely boldface inline literals

2024-01-31 Thread G. Branden Robinson
When discussing literals like "$@" ...boldface the double quotes too. --- doc/bash.1 | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/bash.1 b/doc/bash.1 index 200cf00e..e278c7c3 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -1453,15 +1453,20 @@ .SS Special

[PATCH 11/18] doc/bash.1: drop unneeded quotes from macro args

2024-01-31 Thread G. Branden Robinson
A *roff macro argument need be quoted only if it contains spaces (and spaces within escape sequences don't count; for Ossanna/Kernighan troff, that codicil applies only to the unadjustable break escape sequence, `\ `, which this document uses occasionally--`\~` is preferable but not as portable). -

[PATCH 12/18] doc/bash.1: fix unescaped hyphen

2024-01-31 Thread G. Branden Robinson
Diff of rendering (groff): - reserved word if the next token begins with a ‘‐’. The TIMEFORMAT variable + reserved word if the next token begins with a ‘-’. The TIMEFORMAT variable --- doc/bash.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/bash.1 b/doc/bash

[PATCH 13/18] doc/bash.1: bracket displayed examples with EX/EE

2024-01-31 Thread G. Branden Robinson
This will set them in Courier with modern formatters* when they render to a typesetting device or to HTML, and does no damage on ancient ones. Diff of rendering (groff, Heirloom Doctools, mandoc): -MAILPATH='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has -mail!"' +

[PATCH 14/18] doc/bash.1: apply new `Q` quotation macro

2024-01-31 Thread G. Branden Robinson
Instead of variously using `this' and ``that'' quotation styles (mostly the former), and which which render ugly on systems that hack up groff's character mappings to force ` and ' to the grave accent (U+0060) and neutral apostrophe (U+0027), respectively,[1] employ the new Q macro for all (knock w

[PATCH 15/18] doc/bash.1: favor `TP` over `IP` for tagged paragraphs

2024-01-31 Thread G. Branden Robinson
In the forthcoming groff 1.24.0, I get the following bad rendering: versionThe version test may be used to perform comparisons against specific readline versions. The version This is due to a pending change. commit cba927a37a749cf912a183496002d8545d7619d5 Autho

[PATCH 18/18] doc/bash.1: work around limitation of AT&T troff

2024-01-31 Thread G. Branden Robinson
Diff of rendering (DWB): - parameter expands to a separate word. That is, $@ is - equivalent to $1 "$2" ... If the double-quoted expan- - sion occurs within a word, the expansion of the first - parameter is joined with the beginnin

[PATCH 16/18] doc/bash.1: fix latent formatting problem

2024-01-31 Thread G. Branden Robinson
Dialing up groff 1.23.0 man(7)'s "CHECKSTYLE" warning feature provoked the following diagnostic. an.tmac:doc/bash.1:8043: style: 1 leading space(s) on input line Leading spaces are warned about because they cause the line to break, which is often a surprise to man page authors when text is filled

[PATCH 17/18] doc/bash.1: migrate to strings for troublesome characters

2024-01-31 Thread G. Branden Robinson
Diff of rendering (DWB): - sonal initialization file /.bashrc if the shell is + sonal initialization file ~/.bashrc if the shell is - files /.bash_profile, /.bash_login, or /.profile. By - default, bash reads these files when it is

Re: wait -n misses signaled subprocess

2024-01-31 Thread Chet Ramey
On 1/30/24 12:40 PM, Robert Elz wrote: | since this was the way -n worked orginally, before it started | paying attention to pid arguments. I'm not sure what the "this" is there, if you meant as I described it in my answer to your rhetorical question, viz: Find, or if there are n

[PATCH v2 01/18] doc/bash.1: fix rendering error on old *roffs

2024-01-31 Thread G. Branden Robinson
Hi Chet, Sorry--I need to update 2 of the items in this series. v2: Fix a goof where I regressed the escaped hyphen in "self-insert". The man(7) in Seventh Edition Unix (1979) accepted at most six arguments to any macro. Documenter's Workbench 3.3 troff retains this limitation, as do at least s

[PATCH v2 04/18] doc/bash.1: improve typography of ellipses

2024-01-31 Thread G. Branden Robinson
v2: Prevent confclit with PATCH v2 01/18. Apply ellipsis advice from groff_man_style(7). • The dummy character escape sequence \& follows the ellipsis when further text will follow after space on the output line, keeping its last period from being interpreted as the end of a

Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS

2024-01-31 Thread Chet Ramey
On 1/24/24 7:06 PM, Emanuele Torre wrote: I recently discovered that it is possible to set attributes on readonly variables You've been able to set attributes on readonly variables forever. Even the historical Bourne shell allowed you to export readonly variables. $ declare -p PPID dec

Re: wait -n misses signaled subprocess

2024-01-31 Thread Robert Elz
Date:Wed, 31 Jan 2024 11:35:57 -0500 From:Chet Ramey Message-ID: <1e50aa99-8d53-4cdf-ba5e-6aaf3ccc6...@case.edu> | Not quite. `new' in this sense is the opposite of `anything in the past' | as Dale described it -- already notified and removed from the jobs list.

Re: About `M-C-e` expand result `'` failed

2024-01-31 Thread Chet Ramey
On 1/30/24 10:59 AM, Zachary Santer wrote: On Tue, Jan 30, 2024 at 10:04 AM Andreas Schwab wrote: The command is doing exactly what it is documented to do, that is do all of the shell word expansions. Quote Removal shows up as a subsection of the Shell Expansion section in the manual, but i

Re: About `M-C-e` expand result `'` failed

2024-01-31 Thread Mike Jonkmans
On Wed, Jan 31, 2024 at 04:25:18PM -0500, Chet Ramey wrote: > On 1/30/24 10:59 AM, Zachary Santer wrote: > > On Tue, Jan 30, 2024 at 10:04 AM Andreas Schwab wrote: > > > > > The command is doing exactly what it is documented to do, that is do all > > > of the shell word expansions. > > > > Quote