diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-05-04 10:56:25 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-05-04 10:56:25 +0200 |
commit | 0552e2809cd8aaaec694b5adc77017f563cb9812 (patch) | |
tree | d0f517e34b8127f0845d0a9fb4883539bf5f4e11 /docs/cmdline-opts/gen.pl | |
parent | a51ca050fc193aea9b7ace018c1588a107891d49 (diff) | |
download | curl-0552e2809cd8aaaec694b5adc77017f563cb9812.tar.gz |
curl: generate the --help outputbagder/generate-curl-help
... 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.
Diffstat (limited to 'docs/cmdline-opts/gen.pl')
-rwxr-xr-x | docs/cmdline-opts/gen.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 91e893f3e..73ea6d47b 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -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; |