]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: help2man: recognise option description with smaller indent
authorPádraig Brady <P@draigBrady.com>
Sat, 3 Jan 2026 15:23:18 +0000 (15:23 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 21 Jan 2026 13:51:39 +0000 (13:51 +0000)
* man/help2man: Allow for a smaller indented option description.
This smaller indentation is present in timeout --help output,
so now the line spacing in timeout.1 is more consistent.
Also having the description on a separate line with
a smaller indentation, is a more general way to present
option descriptions (and what the man page formatting uses already).
We'll be changing many utilities, especially with longer multi-line
descriptions to this new format.

man/help2man

index a158c1c33522f1685f21efb1d31d8de24dba8346..5ce8c34a3a4a59c5f708bb114466a2942199b871 100755 (executable)
@@ -534,7 +534,7 @@ while (length)
     my $content = '';
 
     # Option with description.
-    if (s/^( {1,10}([+-]\S.*?))(?:(  +(?!-))|\n( {20,}))(\S.*)\n//)
+    if (s/^( {1,10}([+-]\S.*?))(?:(  +(?!-))|\n( {7,}))(\S.*)\n//)
     {
        $matched .= $& if %append_match;
        $indent = set_indent length ($4 || "$1$3");