From: Alejandro Colomar <alx@kernel.org>
To: linux-man@vger.kernel.org, branden@debian.org, cjwatson@debian.org
Cc: groff@gnu.org, Alejandro Colomar <alx@kernel.org>
Subject: [PATCH 0/3] Add mansect(1) program and manual page
Date: Sun, 3 Nov 2024 00:10:13 +0100 [thread overview]
Message-ID: <cover.1730588410.git.alx@kernel.org> (raw)
In-Reply-To: <CAP-5=fXo5XjxUXshm9eRX-hCcC5VWOv0C5LBZ3Z0_wQb+rdnsw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2600 bytes --]
Hi Branden, Colin,
I'm proposing the addition of this program to the Linux man-pages
repository, as a spin-off of the man_section() shell function that we
already have. Eventually, we could move it to a separate repository, if
it is more appropriate.
Could you please review? (And also give any opinions you have about
it.) It originally supports man(7) only, but we probably can extend it
for mdoc(7) easily.
Here's the manual page, for ease of review:
$ MANWIDTH=64 man man1/mansect.1 | cat
mansect(1) General Commands Manual mansect(1)
NAME
mansect - print the source code of sections of manual
pages
SYNOPSIS
mansect section [file ...]
DESCRIPTION
The mansect command prints the source code of the section
of the given manual‐page files. If no files are speci‐
fied, the standard input is used.
section is a basic regular expression.
The TH line is unconditionally printed.
The output of this program is suitable for piping to the
groff(1) pipeline.
EXAMPLES
$ man ‐w strtol strtoul | xargs mansect ’\(NAME\|SEE ALSO\)’
.TH strtol 3 2024‐07‐23 "Linux man‐pages 6.9.1"
.SH NAME
strtol, strtoll, strtoq - convert a string to a long integer
.SH SEE ALSO
.BR atof (3),
.BR atoi (3),
.BR atol (3),
.BR strtod (3),
.BR strtoimax (3),
.BR strtoul (3)
.TH strtoul 3 2024‐07‐23 "Linux man‐pages 6.9.1"
.SH NAME
strtoul, strtoull, strtouq - convert a string to an unsigned long integer
.SH SEE ALSO
.BR a64l (3),
.BR atof (3),
.BR atoi (3),
.BR atol (3),
.BR strtod (3),
.BR strtol (3),
.BR strtoumax (3)
SEE ALSO
lexgrog(1), groff(1), man(1)
Linux man‐pages (unrelea... (date) mansect(1)
What do you think of it?
Have a lovely night!
Alex
Alejandro Colomar (2):
src/bin/mansect, mansect.1: Add program and its manual page
scripts/bash_aliases: man_section(), man_lsfunc(), man_lsvar(): Use
mansect(1)
Vincent Lefevre (1):
signal.7: Better description for SIGFPE
man/man1/mansect.1 | 61 ++++++++++++++++++++++++++++++++++++++++++++
man/man7/signal.7 | 2 +-
scripts/bash_aliases | 38 +++++----------------------
src/bin/mansect | 33 ++++++++++++++++++++++++
4 files changed, 101 insertions(+), 33 deletions(-)
create mode 100644 man/man1/mansect.1
create mode 100755 src/bin/mansect
--
2.39.5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-11-02 23:10 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 21:17 [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page Ian Rogers
2024-10-15 21:17 ` [PATCH v2 2/3] proc_pid_fdinfo.5: Add subsection headers for different fd types Ian Rogers
2024-10-15 21:17 ` [PATCH v2 3/3] proc_pid_fdinfo.5: Add DRM subsection Ian Rogers
2024-11-01 13:24 ` [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page Alejandro Colomar
2024-11-01 18:19 ` Ian Rogers
2024-11-01 20:07 ` Alejandro Colomar
2024-11-02 10:08 ` G. Branden Robinson
2024-11-02 10:39 ` Alejandro Colomar
2024-11-02 21:36 ` Alejandro Colomar
2024-11-02 23:47 ` Colin Watson
2024-11-03 0:05 ` Alejandro Colomar
2024-11-03 0:07 ` Alejandro Colomar
2024-11-03 0:24 ` Colin Watson
2024-11-03 0:42 ` Alejandro Colomar
2024-11-03 0:47 ` Colin Watson
2024-11-03 1:09 ` G. Branden Robinson
2024-11-03 1:18 ` Colin Watson
2024-11-03 1:59 ` Alejandro Colomar
2024-11-03 14:32 ` Colin Watson
2024-11-03 4:05 ` G. Branden Robinson
2024-11-02 19:06 ` Colin Watson
2024-11-03 0:50 ` G. Branden Robinson
2024-11-03 1:55 ` Colin Watson
2024-11-02 23:10 ` Alejandro Colomar [this message]
2024-11-02 23:10 ` [PATCH] CONTRIBUTING.d/patches: Document new features alongside the features Alejandro Colomar
2024-11-02 23:17 ` Alejandro Colomar
2024-11-02 23:10 ` [PATCH 1/3] signal.7: Better description for SIGFPE Alejandro Colomar
2024-11-02 23:17 ` Alejandro Colomar
2024-11-02 23:10 ` [PATCH 2/3] src/bin/mansect, mansect.1: Add program and its manual page Alejandro Colomar
2024-11-02 23:10 ` [PATCH 3/3] scripts/bash_aliases: man_section(), man_lsfunc(), man_lsvar(): Use mansect(1) Alejandro Colomar
2024-11-03 1:16 ` [PATCH v2 0/4] Add mansect(1) Alejandro Colomar
2024-11-03 1:16 ` [PATCH v2 1/4] src/bin/mansect, mansect.1: Add program and its manual page Alejandro Colomar
2024-11-03 1:17 ` [PATCH v2 2/4] scripts/bash_aliases: man_lsfunc(), man_lsvar(): Use mansect(1) Alejandro Colomar
2024-11-03 1:17 ` [PATCH v2 3/4] scripts/bash_aliases: man_lsfunc(), man_lsvar(): Use pcre2grep(1) instead of pcregrep(1) Alejandro Colomar
2024-11-03 1:17 ` [PATCH v2 4/4] src/bin/mansect: Preprocess with preconv(1) Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1730588410.git.alx@kernel.org \
--to=alx@kernel.org \
--cc=branden@debian.org \
--cc=cjwatson@debian.org \
--cc=groff@gnu.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.