From: Daniel Stenberg Date: Mon, 13 Feb 2023 14:33:13 +0000 (+0100) Subject: curl.1: make help, version and manual sections "custom" X-Git-Tag: curl-7_88_0~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=daf4e6a3a1045cfd09198fd816a9c8280cdb5cc5;p=thirdparty%2Fcurl.git curl.1: make help, version and manual sections "custom" Instead of using "multi: boolean", as these are slightly special as in they do are not enable/disable ones. Fixes #10490 Reported-by: u20221022 on github Closes #10497 --- diff --git a/docs/cmdline-opts/MANPAGE.md b/docs/cmdline-opts/MANPAGE.md index f2d8f51df2..5a584ee2a7 100644 --- a/docs/cmdline-opts/MANPAGE.md +++ b/docs/cmdline-opts/MANPAGE.md @@ -31,7 +31,7 @@ Each file has a set of meta-data and a body of text. Help: (short text for the --help output for this option) Long: (long form name, without dashes) Magic: (description of "magic" options) - Multi: single/append/boolean/mutex (if used more than once) + Multi: single/append/boolean/mutex/custom (if used more than once) Mutexed: (space separated list of options this overrides, no dashes) Protocols: (space separated list for which protocols this option works) Requires: (space separated list of features this requires, no dashes) diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 0fb38d8b02..f6ffb28f3e 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -270,10 +270,6 @@ sub single { print STDERR "ERROR: no 'Long:' in $f\n"; return 1; } - if($multi !~ /(single|append|boolean|mutex)/) { - print STDERR "ERROR: bad 'Multi:' in $f\n"; - return 1; - } if(!$category) { print STDERR "ERROR: no 'Category:' in $f\n"; return 2; @@ -375,6 +371,13 @@ sub single { push @extra, "\nProviding --$long multiple times has no extra effect.\n"; } + elsif($multi eq "custom") { + ; # left for the text to describe + } + else { + print STDERR "$f:$line:1:ERROR: unrecognized Multi: '$multi'\n"; + return 2; + } printdesc(@extra); @@ -622,7 +625,9 @@ sub mainpage { $ret += single($f, 0); } - header("page-footer"); + if(!$ret) { + header("page-footer"); + } exit $ret if($ret); } diff --git a/docs/cmdline-opts/help.d b/docs/cmdline-opts/help.d index 3560d5b6a4..6c69dd43f4 100644 --- a/docs/cmdline-opts/help.d +++ b/docs/cmdline-opts/help.d @@ -8,7 +8,7 @@ Category: important curl Example: --help all Added: 4.0 See-also: verbose -Multi: boolean +Multi: custom --- Usage help. This lists all commands of the . If no arg was provided, curl will display the most important diff --git a/docs/cmdline-opts/manual.d b/docs/cmdline-opts/manual.d index 74b11f9191..9ee4d075ad 100644 --- a/docs/cmdline-opts/manual.d +++ b/docs/cmdline-opts/manual.d @@ -7,6 +7,6 @@ Category: curl Example: --manual Added: 5.2 See-also: verbose libcurl trace -Multi: boolean +Multi: custom --- Manual. Display the huge help text. diff --git a/docs/cmdline-opts/version.d b/docs/cmdline-opts/version.d index cdd22964d6..e4ea3145d7 100644 --- a/docs/cmdline-opts/version.d +++ b/docs/cmdline-opts/version.d @@ -7,7 +7,7 @@ Category: important curl Example: --version Added: 4.0 See-also: help manual -Multi: boolean +Multi: custom --- Displays information about curl and the libcurl version it uses.