mirror of
https://github.com/curl/curl.git
synced 2026-07-24 21:07:28 +03:00
curl: generate the --help output
... using the docs/cmdline-opts/gen.pl script, so that we get all the command line option documentation from the same source. The generation of the list has to be done manually and pasted into the source code. Closes #1465
This commit is contained in:
parent
73afcfc0ae
commit
8b2f22ed29
3 changed files with 435 additions and 253 deletions
|
|
@ -307,10 +307,12 @@ sub listhelp {
|
|||
if($arg) {
|
||||
$opt .= " $arg";
|
||||
}
|
||||
my $desc = $helplong{$f};
|
||||
$desc =~ s/\"/\\\"/g; # escape double quotes
|
||||
|
||||
my $line = sprintf " %-19s %s\n", $opt, $helplong{$f};
|
||||
my $line = sprintf " {\"%s\",\n \"%s\"},\n", $opt, $desc;
|
||||
|
||||
if(length($line) > 79) {
|
||||
if(length($opt) + length($desc) > 78) {
|
||||
print STDERR "WARN: the --$long line is too long\n";
|
||||
}
|
||||
print $line;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue