diff options
| author | Alejandro Colomar <alx@kernel.org> | 2022-10-30 18:59:09 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2022-10-30 23:51:42 +0100 |
| commit | 06cb06123fe9bae68c517d85d3ac08beed6bcaab (patch) | |
| tree | 3c6c39306921dd4e2b10e3e0377b464a8a34b828 | |
| parent | 4c1c52748a06141996fccbf23fb8d9e15cba11e8 (diff) | |
| download | man-pages-06cb06123fe9bae68c517d85d3ac08beed6bcaab.tar.gz | |
Various pages: Use correct letter case in page titles (TH)
Semi-scripted change:
$ find man* -type f \
| xargs grep -L '\.so' \
| while read f; do
P=$(basename $f);
T=$(grep '\.TH ' $f | cut -f2,3 -d' ' | sed 's/ /./');
p=$(echo $P | tr '[:upper:]' '[:lower:]');
t=$(echo $T | tr '[:upper:]' '[:lower:]');
Tn=$(echo $T | sed 's/\.[^.]\+$//')
Pn=$(echo $P | sed 's/\.[^.]\+$//')
N=$(man_section $f NAME \
| sed -n '/NAME/,/ - /p' \
| sed 's/ - .*//' \
| grep -v '^NAME$' \
| tr ', ' '\n' \
| grep -i "^$Pn$" \
| head -n1)
test $P = $T \
&& test -n $N \
&& continue;
if test "x$p" != "x$t"; then
echo 1 $P $T $N;
elif test -z "$N"; then
sed -i "/\.TH /s/$Tn/$Pn/" $f;
fi;
done;
Most of the changes produced by this script needed to be reverted,
but the some of them were good.
On 10/30/22 23:00, G. Branden Robinson wrote:
> For those to whom this change is coming as an unpleasant surprise, the
> forthcoming groff 1.23.0 features an option that will reverse this
> change at rendering time.
>
> From groff_man(7):
>
> -rCT=1 Capitalize titles, setting the man page title (the first
> argument to .TH) in full capitals in headers and footers.
> This transformation is off by default because it discards
> case distinction information.
>
> This register can also be set in a site-local "man.local" file to force
> it on for all pages. On Debian-based systems, this file is in
> /etc/groff. The following line will do the trick.
>
> .nr CT 1
>
> The groff_man_style(7) man page offers further examples of such
> rendering customization.
>
> /usr/local/share/groff/site-tmac/man.local
> Put site‐local changes and customizations into this file.
>
> .\" Use narrower indentation on terminals and similar.
> .if n .nr IN 4n
> .\" Put only one space after the end of a sentence.
> .ss 12 0 \" See groff(7).
> .\" Keep pages narrow even on wide terminals.
> .if n .if \n[LL]>78n .nr LL 78n
> .\" Ensure hyperlinks are enabled for terminals.
> .nr U 1
>
> On multi‐user systems, it is more considerate to users whose
> preferences may differ from the administrator’s to be less
> aggressive with such settings, or to permit their override
> with a user‐specific man.local file. This can be achieved by
> placing one or both of following requests at the end of the
> site‐local file.
> .soquiet \V[XDG_CONFIG_HOME]/man.local
> .soquiet \V[HOME]/.man.local
> However, a security‐sandboxed man(1) program may lack
> permission to open such files.
Cc: Ingo Schwarze <schwarze@openbsd.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man7/man-pages.7 | 2 | ||||
| -rw-r--r-- | man7/persistent-keyring.7 | 2 | ||||
| -rw-r--r-- | man7/process-keyring.7 | 2 | ||||
| -rw-r--r-- | man7/session-keyring.7 | 2 | ||||
| -rw-r--r-- | man7/signal-safety.7 | 2 | ||||
| -rw-r--r-- | man7/thread-keyring.7 | 2 | ||||
| -rw-r--r-- | man7/user-keyring.7 | 2 | ||||
| -rw-r--r-- | man7/user-session-keyring.7 | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/man7/man-pages.7 b/man7/man-pages.7 index 03b0e6c154..73c0522d11 100644 --- a/man7/man-pages.7 +++ b/man7/man-pages.7 @@ -7,7 +7,7 @@ .\" 2007-05-30 created by mtk, using text from old man.7 plus .\" rewrites and additional text. .\" -.TH MAN-PAGES 7 (date) "Linux man-pages (unreleased)" +.TH man-pages 7 (date) "Linux man-pages (unreleased)" .SH NAME man-pages \- conventions for writing Linux man pages .SH SYNOPSIS diff --git a/man7/persistent-keyring.7 b/man7/persistent-keyring.7 index a93c9d84f0..2a7fe49c23 100644 --- a/man7/persistent-keyring.7 +++ b/man7/persistent-keyring.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH PERSISTENT-KEYRING 7 (date) "Linux man-pages (unreleased)" +.TH persistent-keyring 7 (date) "Linux man-pages (unreleased)" .SH NAME persistent-keyring \- per-user persistent keyring .SH DESCRIPTION diff --git a/man7/process-keyring.7 b/man7/process-keyring.7 index ec6fbc8f14..864b05bcdd 100644 --- a/man7/process-keyring.7 +++ b/man7/process-keyring.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH PROCESS-KEYRING 7 (date) "Linux man-pages (unreleased)" +.TH process-keyring 7 (date) "Linux man-pages (unreleased)" .SH NAME process-keyring \- per-process shared keyring .SH DESCRIPTION diff --git a/man7/session-keyring.7 b/man7/session-keyring.7 index 1921ce8abe..cece09fa4b 100644 --- a/man7/session-keyring.7 +++ b/man7/session-keyring.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH SESSION-KEYRING 7 (date) "Linux man-pages (unreleased)" +.TH session-keyring 7 (date) "Linux man-pages (unreleased)" .SH NAME session-keyring \- session shared process keyring .SH DESCRIPTION diff --git a/man7/signal-safety.7 b/man7/signal-safety.7 index b6a563b919..8833dbc3ea 100644 --- a/man7/signal-safety.7 +++ b/man7/signal-safety.7 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH SIGNAL-SAFETY 7 (date) "Linux man-pages (unreleased)" +.TH signal-safety 7 (date) "Linux man-pages (unreleased)" .SH NAME signal-safety \- async-signal-safe functions .SH DESCRIPTION diff --git a/man7/thread-keyring.7 b/man7/thread-keyring.7 index c093b8fed0..b47f682433 100644 --- a/man7/thread-keyring.7 +++ b/man7/thread-keyring.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH THREAD-KEYRING 7 (date) "Linux man-pages (unreleased)" +.TH thread-keyring 7 (date) "Linux man-pages (unreleased)" .SH NAME thread-keyring \- per-thread keyring .SH DESCRIPTION diff --git a/man7/user-keyring.7 b/man7/user-keyring.7 index 4634f5570e..a6e29c9dbd 100644 --- a/man7/user-keyring.7 +++ b/man7/user-keyring.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH USER-KEYRING 7 (date) "Linux man-pages (unreleased)" +.TH user-keyring 7 (date) "Linux man-pages (unreleased)" .SH NAME user-keyring \- per-user keyring .SH DESCRIPTION diff --git a/man7/user-session-keyring.7 b/man7/user-session-keyring.7 index 009c404aa6..bd0ba3d232 100644 --- a/man7/user-session-keyring.7 +++ b/man7/user-session-keyring.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH USER-SESSION-KEYRING 7 (date) "Linux man-pages (unreleased)" +.TH user-session-keyring 7 (date) "Linux man-pages (unreleased)" .SH NAME user-session-keyring \- per-user default session keyring .SH DESCRIPTION |
