Skip to content

Commit 3e0d2c5

Browse files
committed
Fix help with last version of curl
Fixes #33
1 parent 78f7af5 commit 3e0d2c5

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

args/curlopts.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package args
22

33
var (
4-
curlShortValues = "EKCbcdDFPHmoUreXYytzTuAw"
4+
curlShortValues = "EKCbcdDFPHhmoUreXYytzTuAw"
55
curlLongValues = []string{
66
"abstract-unix-socket",
7+
"alt-svc",
78
"cacert",
89
"capath",
910
"cert",
@@ -16,6 +17,7 @@ var (
1617
"cookie",
1718
"cookie-jar",
1819
"crlfile",
20+
"curves",
1921
"data",
2022
"data-ascii",
2123
"data-binary",
@@ -26,9 +28,12 @@ var (
2628
"dns-ipv4-addr",
2729
"dns-ipv6-addr",
2830
"dns-servers",
31+
"doh-url",
2932
"dump-header",
3033
"egd-file",
3134
"engine",
35+
"etag-compare",
36+
"etag-save",
3237
"expect100-timeout",
3338
"form",
3439
"form-string",
@@ -39,6 +44,7 @@ var (
3944
"ftp-ssl-ccc-mode",
4045
"happy-eyeballs-timeout-ms",
4146
"header",
47+
"help",
4248
"hostpubmd5",
4349
"interface",
4450
"keepalive-time",
@@ -59,6 +65,7 @@ var (
5965
"noproxy",
6066
"oauth2-bearer",
6167
"output",
68+
"output-dir",
6269
"pass",
6370
"pinnedpubkey",
6471
"proto",
@@ -91,6 +98,7 @@ var (
9198
"retry",
9299
"retry-delay",
93100
"retry-max-time",
101+
"sasl-authzid",
94102
"service-name",
95103
"socks4",
96104
"socks4a",

args/gen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
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
3+
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

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func main() {
4949

5050
if len(opts) == 0 {
5151
// Show help if no args
52-
opts = append(opts, "-h")
52+
opts = append(opts, "-h", "all")
5353
} else {
5454
// Remove progress bar.
5555
opts = append(opts, "-s", "-S")

0 commit comments

Comments
 (0)