Skip to content

Commit 09f1b6e

Browse files
authored
Fix proxy option (#87)
1 parent 2f58e8f commit 09f1b6e

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,17 @@ Or download a [binary package](https://github.com/rs/curlie/releases/latest).
6060

6161
Synopsis:
6262

63-
$ curlie [CURL_OPTIONS...] [METHOD] URL [ITEM [ITEM]]
63+
```sh
64+
curlie [CURL_OPTIONS...] [METHOD] URL [ITEM [ITEM]]
65+
```
6466
6567
Simple GET:
6668
67-
![](doc/get.png)
69+
![Simple GET request example](doc/get.png)
6870
6971
Custom method, headers and JSON data:
7072
71-
![](doc/put.png)
73+
![Custom PUT request with headers and JSON data example](doc/put.png)
7274
7375
When running interactively, `curlie` provides pretty-printed output for json. To force pretty-printed output, pass `--pretty`.
7476
@@ -77,13 +79,13 @@ When running interactively, `curlie` provides pretty-printed output for json. To
7779
Build with [goreleaser](https://goreleaser.com) to test that all platforms compile properly.
7880
7981
```sh
80-
goreleaser --snapshot --skip-publish --rm-dist
82+
goreleaser build --clean --snapshot
8183
```
8284
83-
Or with `go build` for your current platform only.
85+
Or for your current platform only.
8486
8587
```sh
86-
go build .
88+
goreleaser build --clean --snapshot --single-target
8789
```
8890
8991
## Differences with httpie

args/curlopts.go

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

3+
import "sort"
4+
35
var (
46
curlShortValues = "EKCbcdDFPHhmoUQreXYytzTuAw"
57
curlLongValues = []string{
@@ -77,6 +79,7 @@ var (
7779
"proto",
7880
"proto-default",
7981
"proto-redir",
82+
"proxy",
8083
"proxy-cacert",
8184
"proxy-capath",
8285
"proxy-cert",
@@ -133,5 +136,10 @@ var (
133136
"url-query",
134137
"user",
135138
"user-agent",
136-
"write-out"}
139+
"write-out",
140+
}
137141
)
142+
143+
func init() {
144+
sort.Strings(curlLongValues)
145+
}

0 commit comments

Comments
 (0)