groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 3/3] src/bin/mansect: Preprocess with preconv(1)


From: Alejandro Colomar
Subject: [PATCH v2 3/3] src/bin/mansect: Preprocess with preconv(1)
Date: Sun, 3 Nov 2024 02:17:18 +0100

This doesn't process the pages in a significant way, and has the benefit
that it writes the name of the pages in the output.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 src/bin/mansect | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/mansect b/src/bin/mansect
index a13a6b534..e1e83a8d8 100755
--- a/src/bin/mansect
+++ b/src/bin/mansect
@@ -14,13 +14,14 @@ shift;
 
 
 if test $# -lt 1; then
-       cat;
+       preconv;
 else
        find -L "$@" -not -type d \
        | xargs grep -l '^\.TH ' \
-       | xargs cat;
+       | xargs preconv;
 fi \
 | sed -En \
+       -e '/^\.lf 1 /p' \
        -e '/^\.TH /p' \
        -e '/^\.SH '"$s"'$/p' \
        -e '/^\.SH '"$s"'$/,/^\.(TH|SH)/{/^\.(TH|SH)/!p}';
-- 
2.39.5

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]