-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
_curl
200 lines (194 loc) · 11.3 KB
/
_curl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#compdef curl
# curl zsh completion
local curcontext="$curcontext" state state_descr line
typeset -A opt_args
local rc=1
_arguments -C -S \
{-y,--speed-time}'[Trigger '\''speed-limit'\'' abort after SECONDS (default: 30)]':SECONDS \
--proxy-negotiate'[Use HTTP Negotiate (SPNEGO) authentication on the proxy (H)]' \
{-Y,--speed-limit}'[Stop transfers below RATE for '\''speed-time'\'' secs]':RATE \
--location-trusted'[Like '\''--location'\'', and send auth to other hosts (H)]' \
{-S,--show-error}'[Show error. With -s, make curl show errors when they occur]' \
{-c,--cookie-jar}'[Write cookies to FILE after operation (H)]':FILE:_files \
--ftp-alternative-to-user'[String to replace "USER \[name\]" (F)]':COMMAND \
--ftp-ssl-control'[Require SSL/TLS for FTP login, clear for transfer (F)]' \
--libcurl'[Dump libcurl equivalent code of this command line]':FILE:_files \
--crlfile'[Get a CRL list in PEM format from the given file]':FILE:_files \
{-p,--proxytunnel}'[Operate through a HTTP proxy tunnel (using CONNECT)]' \
--hostpubmd5'[Hex-encoded MD5 string of the host public key. (SSH)]':MD5 \
{-j,--junk-session-cookies}'[Ignore session cookies read from file (H)]' \
{-:,--next}'[Allows the following URL to use a separate set of options]' \
{-E,--cert}'[Client certificate file and password (SSL)]':CERT[:PASSWD] \
--connect-to'[Connect to host (network level)]':HOST1:PORT1:HOST2:PORT2 \
{-R,--remote-time}'[Set the remote file'\''s time on the local output]' \
{-P,--ftp-port}'[Use PORT with given address instead of PASV (F)]':ADR \
{-Q,--quote}'[Send command(s) to server before transfer (F/SFTP)]':CMD \
--socks5-hostname'[SOCKS5 proxy, pass host name to proxy]':HOST[:PORT] \
--dns-ipv4-addr'[IPv4 address to use for DNS requests, dot notation]' \
--dns-ipv6-addr'[IPv6 address to use for DNS requests, dot notation]' \
--engine'[Crypto engine (use "--engine list" for list) (SSL)]':ENGINE \
--pinnedpubkey'[Public key to verify peer against (SSL)]':FILE/HASHES \
--proto-default'[Use PROTOCOL for any URL missing a scheme]':PROTOCOL \
{-O,--remote-name}'[Write output to a file named as the remote file]' \
--socks5-gssapi-service'[SOCKS5 proxy service name for GSS-API]':NAME \
--stderr'[Where to redirect stderr (use "-" for stdout)]':FILE:_files \
--expect100-timeout'[How long to wait for 100-continue (H)]':SECONDS \
{-g,--globoff}'[Disable URL sequences and ranges using {} and \[\]]' \
--post301'[Do not switch to GET after following a 301 redirect (H)]' \
--post302'[Do not switch to GET after following a 302 redirect (H)]' \
--post303'[Do not switch to GET after following a 303 redirect (H)]' \
--random-file'[File for reading random data from (SSL)]':FILE:_files \
--resolve'[Force resolve of HOST:PORT to ADDRESS]':HOST:PORT:ADDRESS \
--unix-socket'[Connect through this Unix domain socket]':FILE:_files \
--cacert'[CA certificate to verify peer against (SSL)]':FILE:_files \
--compressed'[Request compressed response (using deflate or gzip)]' \
{-k,--insecure}'[Allow connections to SSL sites without certs (H)]' \
--mail-auth'[Originator address of the original email (SMTP)]':AUTH \
--cert-status'[Verify the status of the server certificate (SSL)]' \
{-f,--fail}'[Fail silently (no output at all) on HTTP errors (H)]' \
--http2-prior-knowledge'[Use HTTP 2 without HTTP/1.1 Upgrade (H)]' \
--login-options'[Server login options (IMAP, POP3, SMTP)]':OPTIONS \
{-#,--progress-bar}'[Display transfer progress as a progress bar]' \
--retry'[Retry request NUM times if transient problems occur]':NUM \
--keepalive-time'[Wait SECONDS between keepalive probes]':SECONDS \
{-J,--remote-header-name}'[Use the header-provided filename (H)]' \
--ssl-allow-beast'[Allow security flaw to improve interop (SSL)]' \
--trace-ascii'[Like --trace, but without hex output]':FILE:_files \
--capath'[CA directory to verify peer against (SSL)]':DIR:_files \
--connect-timeout'[Maximum time allowed for connection]':SECONDS \
--ftp-method'[Control CWD usage (F)]':[MULTICWD/NOCWD/SINGLECWD] \
--ignore-content-length'[Ignore the HTTP Content-Length header]' \
{-m,--max-time}'[Maximum time allowed for the transfer]':SECONDS \
--oauth2-bearer'[OAuth 2 Bearer Token (IMAP, POP3, SMTP)]':TOKEN \
{-x,--proxy}'[Use proxy on given port]':[PROTOCOL://]HOST[:PORT] \
{-A,--user-agent}'[Send User-Agent STRING to server (H)]':STRING \
--egd-file'[EGD socket path for random data (SSL)]':FILE:_files \
--local-port'[Force use of RANGE for local port numbers]':RANGE \
--proto-redir'[Enable/disable PROTOCOLS on redirect]':PROTOCOLS \
{-a,--append}'[Append to target file when uploading (F/SFTP)]' \
{-b,--cookie}'[Read cookies from STRING/FILE (H)]':STRING/FILE \
--ftp-create-dirs'[Create the remote dirs if not present (F)]' \
{-i,--include}'[Include protocol headers in the output (H/F)]' \
--tftp-blksize'[Set TFTP BLKSIZE option (must be >512)]':VALUE \
{-T,--upload-file}'[Transfer FILE to destination]':FILE:_files \
--tlsauthtype'[TLS authentication type (default: SRP)]':STRING \
--cert-type'[Certificate file type (DER/PEM/ENG) (SSL)]':TYPE \
--negotiate'[Use HTTP Negotiate (SPNEGO) authentication (H)]' \
--proxy-anyauth'[Pick "any" proxy authentication method (H)]' \
{-w,--write-out}'[Use output FORMAT after completion]':FORMAT \
--form-string'[Specify HTTP multipart POST data (H)]':STRING \
--key-type'[Private key file type (DER/PEM/ENG) (SSL)]':TYPE \
{-o,--output}'[Write to FILE instead of stdout]':FILE:_files \
--proxy-digest'[Use Digest authentication on the proxy (H)]' \
{-U,--proxy-user}'[Proxy user and password]':USER[:PASSWORD] \
--create-dirs'[Create necessary local directory hierarchy]' \
{-D,--dump-header}'[Write the headers to FILE]':FILE:_files \
{-F,--form}'[Specify HTTP multipart POST data (H)]':CONTENT \
{-H,--header}'[Pass custom header LINE to server (H)]':LINE \
--interface'[Use network INTERFACE (or address)]':INTERFACE \
--max-filesize'[Maximum file size to download (H/F)]':BYTES \
--max-redirs'[Maximum number of redirects allowed (H)]':NUM \
{-n,--netrc}'[Must read .netrc for user name and password]' \
--proxy-header'[Pass custom header LINE to proxy (H)]':LINE \
--sasl-ir'[Enable initial response in SASL authentication]' \
--socks4a'[SOCKS4a proxy on given host + port]':HOST[:PORT] \
--socks5-gssapi-nec'[Compatibility with NEC SOCKS5 server]' \
{-z,--time-cond}'[Transfer based on a time condition]':TIME \
{-q,--disable}'[Disable .curlrc (must be first parameter)]' \
--netrc-optional'[Use either .netrc or URL; overrides -n]' \
{-N,--no-buffer}'[Disable buffering of the output stream]' \
--ntlm-wb'[Use HTTP NTLM authentication with winbind (H)]' \
--proxy-basic'[Use Basic authentication on the proxy (H)]' \
--proxy1.0'[Use HTTP/1.0 proxy on given port]':HOST[:PORT] \
{-r,--range}'[Retrieve only the bytes within RANGE]':RANGE \
--remote-name-all'[Use the remote file name for all URLs]' \
--ssl-no-revoke'[Disable cert revocation checks (WinSSL)]' \
--dns-servers'[DNS server addrs to use: 1.1.1.1;2.2.2.2]' \
--no-keepalive'[Disable keepalive use on the connection]' \
--retry-max-time'[Retry only within this period]':SECONDS \
--socks4'[SOCKS4 proxy on given host + port]':HOST[:PORT] \
--socks5'[SOCKS5 proxy on given host + port]':HOST[:PORT] \
--tr-encoding'[Request compressed transfer encoding (H)]' \
--data-raw'[HTTP POST data, '\''@'\'' allowed (H)]':DATA \
--pass'[Pass phrase for the private key (SSL/SSH)]':PASS \
--proxy-ntlm'[Use NTLM authentication on the proxy (H)]' \
{-X,--request}'[Specify request command to use]':COMMAND \
--data-urlencode'[HTTP POST data url encoded (H)]':DATA \
{-s,--silent}'[Silent mode (don'\''t output anything)]' \
--trace-time'[Add time stamps to trace/verbose output]' \
{-u,--user}'[Server user and password]':USER[:PASSWORD] \
--ftp-skip-pasv-ip'[Skip the IP address for PASV (F)]' \
--krb'[Enable Kerberos with security LEVEL (F)]':LEVEL \
--no-sessionid'[Disable SSL session-ID reusing (SSL)]' \
--path-as-is'[Do not squash .. sequences in URL path]' \
--proxy-service-name'[SPNEGO proxy service name]':NAME \
--tftp-no-options'[Do not send TFTP options requests]' \
--ftp-ssl-ccc-mode'[Set CCC mode (F)]':ACTIVE/PASSIVE \
--mail-rcpt'[Mail to this/these addresses (SMTP)]':TO \
--metalink'[Process given URLs as metalink XML file]' \
--retry-delay'[Wait SECONDS between retries]':SECONDS \
--ssl-reqd'[Require SSL/TLS (FTP, IMAP, POP3, SMTP)]' \
--xattr'[Store metadata in extended file attributes]' \
{-C,--continue-at}'[Resumed transfer OFFSET]':OFFSET \
--delegation'[GSS-API delegation permission]':STRING \
--dns-interface'[Interface to use for DNS requests]' \
--ftp-pret'[Send PRET before PASV (for drftpd) (F)]' \
{-v,--verbose}'[Make the operation more talkative]' \
{-K,--config}'[Read config from FILE]':FILE:_files \
--ftp-ssl-ccc'[Send CCC after authenticating (F)]' \
{-G,--get}'[Send the -d data with a HTTP GET (H)]' \
--netrc-file'[Specify FILE for netrc]':FILE:_files \
--trace'[Write a debug trace to FILE]':FILE:_files \
--anyauth'[Pick "any" authentication method (H)]' \
--limit-rate'[Limit transfer speed to RATE]':RATE \
--mail-from'[Mail from this address (SMTP)]':FROM \
--noproxy'[List of hosts which do not use proxy]' \
--disable-eprt'[Inhibit using EPRT or LPRT (F)]' \
--raw'[Do HTTP "raw"; no transfer decoding (H)]' \
--data-binary'[HTTP POST binary data (H)]':DATA \
--ftp-pasv'[Use PASV/EPSV instead of PORT (F)]' \
--no-alpn'[Disable the ALPN TLS extension (H)]' \
--digest'[Use HTTP Digest Authentication (H)]' \
{-V,--version}'[Show version number and quit]' \
--data-ascii'[HTTP POST ASCII data (H)]':DATA \
--ftp-account'[Account data string (F)]':DATA \
--no-npn'[Disable the NPN TLS extension (H)]' \
--proto'[Enable/disable PROTOCOLS]':PROTOCOLS \
{-t,--telnet-option}'[Set telnet option]':OPT=VAL \
--basic'[Use HTTP Basic Authentication (H)]' \
--key'[Private key file name (SSL/SSH)]':KEY \
--ssl'[Try SSL/TLS (FTP, IMAP, POP3, SMTP)]' \
{-4,--ipv4}'[Resolve name to IPv4 address]' \
{-6,--ipv6}'[Resolve name to IPv6 address]' \
{-l,--list-only}'[List only mode (F/POP3)]' \
--tcp-nodelay'[Use the TCP_NODELAY option]' \
{-B,--use-ascii}'[Use ASCII/text transfer]' \
--ciphers'[SSL ciphers to use (SSL)]':LIST \
--ntlm'[Use HTTP NTLM authentication (H)]' \
--service-name'[SPNEGO service name]':NAME \
--pubkey'[Public key file name (SSH)]':KEY \
--disable-epsv'[Inhibit using EPSV (F)]' \
--false-start'[Enable TLS False Start.]' \
{-M,--manual}'[Display the full manual]' \
{-L,--location}'[Follow redirects (H)]' \
--crlf'[Convert LF to CRLF in upload]' \
{-d,--data}'[HTTP POST data (H)]':DATA \
{-I,--head}'[Show document info only]' \
--tlspassword'[TLS password]':STRING \
--tcp-fastopen'[Use TCP Fast Open]' \
{-0,--http1.0}'[Use HTTP 1.0 (H)]' \
{-e,--referer}'[Referer URL (H)]' \
{-2,--sslv2}'[Use SSLv2 (SSL)]' \
{-3,--sslv3}'[Use SSLv3 (SSL)]' \
--tlsv1.0'[Use TLSv1.0 (SSL)]' \
--tlsv1.1'[Use TLSv1.1 (SSL)]' \
--tlsv1.2'[Use TLSv1.2 (SSL)]' \
--tlsuser'[TLS username]':USER \
{-h,--help}'[This help text]' \
--http1.1'[Use HTTP 1.1 (H)]' \
--url'[URL to work with]':URL \
--http2'[Use HTTP 2 (H)]' \
{-1,--tlsv1}'[Use >= TLSv1 (SSL)]' \
'*:URL:_urls' && rc=0
return rc
# vim:ft=zsh:et:sts=2:sw=2