From 3e0d2c56eb127c25281b632e49bc4af98e662356 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Tue, 3 Nov 2020 15:41:50 +0100 Subject: [PATCH] Fix help with last version of curl Fixes #33 --- args/curlopts.go | 10 +++++++++- args/gen.sh | 2 +- main.go | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/args/curlopts.go b/args/curlopts.go index 3555137..e141dbc 100644 --- a/args/curlopts.go +++ b/args/curlopts.go @@ -1,9 +1,10 @@ package args var ( - curlShortValues = "EKCbcdDFPHmoUreXYytzTuAw" + curlShortValues = "EKCbcdDFPHhmoUreXYytzTuAw" curlLongValues = []string{ "abstract-unix-socket", + "alt-svc", "cacert", "capath", "cert", @@ -16,6 +17,7 @@ var ( "cookie", "cookie-jar", "crlfile", + "curves", "data", "data-ascii", "data-binary", @@ -26,9 +28,12 @@ var ( "dns-ipv4-addr", "dns-ipv6-addr", "dns-servers", + "doh-url", "dump-header", "egd-file", "engine", + "etag-compare", + "etag-save", "expect100-timeout", "form", "form-string", @@ -39,6 +44,7 @@ var ( "ftp-ssl-ccc-mode", "happy-eyeballs-timeout-ms", "header", + "help", "hostpubmd5", "interface", "keepalive-time", @@ -59,6 +65,7 @@ var ( "noproxy", "oauth2-bearer", "output", + "output-dir", "pass", "pinnedpubkey", "proto", @@ -91,6 +98,7 @@ var ( "retry", "retry-delay", "retry-max-time", + "sasl-authzid", "service-name", "socks4", "socks4a", diff --git a/args/gen.sh b/args/gen.sh index fa73ffb..50c32a1 100755 --- a/args/gen.sh +++ b/args/gen.sh @@ -1,3 +1,3 @@ #!/bin/bash -curl -h|perl -pe 's/^\s*(?:-([^-]),\s+)?--(.*?)\s+<.*?>.*/push @a, $1; push @b, $2/e; undef $_; END {print "package args\n\nvar (\n\tcurlShortValues = \"", @a, "\"\n\tcurlLongValues = []string{\n", join(",\n", map {"\t\t\"$_\""} @b), "}\n)\n"}' > curlopts.go +curl -h all|perl -pe 's/^\s*(?:-([^-]),\s+)?--(.*?)\s+<.*?>.*/push @a, $1; push @b, $2/e; undef $_; END {print "package args\n\nvar (\n\tcurlShortValues = \"", @a, "\"\n\tcurlLongValues = []string{\n", join(",\n", map {"\t\t\"$_\""} @b), "}\n)\n"}' > curlopts.go diff --git a/main.go b/main.go index 7a857f1..4e4ccf2 100644 --- a/main.go +++ b/main.go @@ -49,7 +49,7 @@ func main() { if len(opts) == 0 { // Show help if no args - opts = append(opts, "-h") + opts = append(opts, "-h", "all") } else { // Remove progress bar. opts = append(opts, "-s", "-S")