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:50:30 +0100 |
commit | 4c1c52748a06141996fccbf23fb8d9e15cba11e8 (patch) | |
tree | db53f9fd936fcbe72e41f7b2414f60689f25e045 /man1 | |
parent | bd14f1e3236a1f016b7a8a85deb34379c4470687 (diff) |
Many pages: Use correct letter case in page titles (TH)
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
echo 2 $P $T $N;
else
sed -i "/\.TH /s/$Tn/$N/" $f;
fi;
done;
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>
Diffstat (limited to 'man1')
-rw-r--r-- | man1/iconv.1 | 2 | ||||
-rw-r--r-- | man1/intro.1 | 2 | ||||
-rw-r--r-- | man1/locale.1 | 2 | ||||
-rw-r--r-- | man1/localedef.1 | 2 | ||||
-rw-r--r-- | man1/memusagestat.1 | 2 | ||||
-rw-r--r-- | man1/mtrace.1 | 2 | ||||
-rw-r--r-- | man1/time.1 | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/man1/iconv.1 b/man1/iconv.1 index 5140e15e1..fba7669ef 100644 --- a/man1/iconv.1 +++ b/man1/iconv.1 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH ICONV 1 (date) "Linux man-pages (unreleased)" +.TH iconv 1 (date) "Linux man-pages (unreleased)" .SH NAME iconv \- convert text from one character encoding to another .SH SYNOPSIS diff --git a/man1/intro.1 b/man1/intro.1 index c5fcba1ce..7ae8ab0a6 100644 --- a/man1/intro.1 +++ b/man1/intro.1 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH INTRO 1 (date) "Linux man-pages (unreleased)" +.TH intro 1 (date) "Linux man-pages (unreleased)" .SH NAME intro \- introduction to user commands .SH DESCRIPTION diff --git a/man1/locale.1 b/man1/locale.1 index da240d116..b53f6f4f1 100644 --- a/man1/locale.1 +++ b/man1/locale.1 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH LOCALE 1 (date) "Linux man-pages (unreleased)" +.TH locale 1 (date) "Linux man-pages (unreleased)" .SH NAME locale \- get locale-specific information .SH SYNOPSIS diff --git a/man1/localedef.1 b/man1/localedef.1 index 9c393cd66..72e0e953c 100644 --- a/man1/localedef.1 +++ b/man1/localedef.1 @@ -12,7 +12,7 @@ .\" Lars Wirzenius to document new functionality (as of GNU .\" C library 2.3.5). .\" -.TH LOCALEDEF 1 (date) "Linux man-pages (unreleased)" +.TH localedef 1 (date) "Linux man-pages (unreleased)" .SH NAME localedef \- compile locale definition files .SH SYNOPSIS diff --git a/man1/memusagestat.1 b/man1/memusagestat.1 index c416cdc97..5559ade69 100644 --- a/man1/memusagestat.1 +++ b/man1/memusagestat.1 @@ -1,7 +1,7 @@ .\" Copyright (c) 2013, Peter Schiffer <pschiffe@redhat.com> .\" .\" SPDX-License-Identifier: GPL-2.0-or-later -.TH MEMUSAGESTAT 1 (date) "Linux man-pages (unreleased)" +.TH memusagestat 1 (date) "Linux man-pages (unreleased)" .SH NAME memusagestat \- generate graphic from memory profiling data .SH SYNOPSIS diff --git a/man1/mtrace.1 b/man1/mtrace.1 index 4d619830e..54c13ccf8 100644 --- a/man1/mtrace.1 +++ b/man1/mtrace.1 @@ -1,7 +1,7 @@ .\" Copyright (c) 2013, Peter Schiffer (pschiffe@redhat.com) .\" .\" SPDX-License-Identifier: GPL-2.0-or-later -.TH MTRACE 1 (date) "Linux man-pages (unreleased)" +.TH mtrace 1 (date) "Linux man-pages (unreleased)" .SH NAME mtrace \- interpret the malloc trace log .SH SYNOPSIS diff --git a/man1/time.1 b/man1/time.1 index 2264d262d..f6d9cb5a1 100644 --- a/man1/time.1 +++ b/man1/time.1 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH TIME 1 (date) "Linux man-pages (unreleased)" +.TH time 1 (date) "Linux man-pages (unreleased)" .SH NAME time \- time a simple command or give resource usage .SH SYNOPSIS |