From: Pádraig Brady
Date: Wed, 1 Oct 2025 17:38:21 +0000 (+0100) Subject: doc: man: consistently italicize --option parameters X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cac40b6373fe414b2f75f2c93abccf990d2834b;p=thirdparty%2Fcoreutils.git doc: man: consistently italicize --option parameters This changes a few pages, but the changes in tail.1 concisely illustrate the resulting man page changes: $ diff -r man.orig/tail.1 man/tail.1 < \fB\-c\fR, \fB\-\-bytes\fR=\fI\,[\/\fR+]NUM > \fB\-c\fR, \fB\-\-bytes\fR=\fI\,[+]NUM\/\fR < \fB\-f\fR, \fB\-\-follow[=\fR{name|descriptor}] > \fB\-f\fR, \fB\-\-follow\fR[=\fI\,{name|descriptor}\/\fR] < \fB\-n\fR, \fB\-\-lines\fR=\fI\,[\/\fR+]NUM > \fB\-n\fR, \fB\-\-lines\fR=\fI\,[+]NUM\/\fR * man/help2man: Relax the option match so more --option variations are supported, and passed through to convert_option(). Specifically more variations after '=' are now supported. Also split and document the regular expression. Reported at https://github.com/coreutils/coreutils/issues/84 --- diff --git a/man/help2man b/man/help2man index 960eebcae2..da03e14da7 100755 --- a/man/help2man +++ b/man/help2man @@ -600,7 +600,12 @@ while (length) unless ($sect eq _('EXAMPLES')) { # Convert options. - s/(^|[ (])(-[][\w=-]+)/$1 . convert_option $2/mge; + s/ + ( + ^|[ (])(-[][\w-]+ # Base -o or --option match + (?:=\S*[^\s,.])? # =parameter portion match + ) + /$1 . convert_option $2/xmge; # Italicise filenames: /a/b, $VAR/c/d, ~/e/f s!