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
This commit is contained in:
Daniel Stenberg 2023-02-13 15:33:13 +01:00
parent c74bad29fd
commit daf4e6a3a1
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
5 changed files with 14 additions and 9 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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 <category>.
If no arg was provided, curl will display the most important

View File

@ -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.

View File

@ -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.