#compdef curl
# curl zsh completion
local curcontext="$curcontext" state state_descr line
typeset -A opt_args
local rc=1
_arguments -C -S \
--aws-sigv4'[Use AWS V4 signature authentication]':'' \
{-c,--cookie-jar}'[Write cookies to after operation]':'':_files \
--resolve'[Resolve the host+port to this address]':'<[+]host\:port\:addr[,addr]...>' \
{-D,--dump-header}'[Write the received headers to ]':'':_files \
{-y,--speed-time}'[Trigger '\''speed-limit'\'' abort after this time]':'' \
--proxy-cacert'[CA certificate to verify peer against for proxy]':'':_files \
--happy-eyeballs-timeout-ms'[Time for IPv6 before trying IPv4]':'' \
{-E,--cert}'[Client certificate file and password]':'' \
--etag-save'[Parse ETag from a request and save it to a file]':'':_files \
--libcurl'[Dump libcurl equivalent code of this command line]':'':_files \
--proxy-capath'[CA directory to verify peer against for proxy]':'':_files \
--proxy-pinnedpubkey'[FILE/HASHES public key to verify proxy with]':'' \
--crlfile'[Get a CRL list in PEM format from the given file]':'':_files \
--doh-cert-status'[Verify the status of the DOH server cert via OCSP-staple]' \
--etag-compare'[Pass an ETag from a file as a custom header]':'':_files \
--curves'[(EC) TLS key exchange algorithm(s) to request]':'' \
--proxy-negotiate'[Use HTTP Negotiate (SPNEGO) authentication on the proxy]' \
--mail-rcpt-allowfails'[Allow RCPT TO command to fail for some recipients]' \
--socks5-hostname'[SOCKS5 proxy, pass host name to proxy]':'' \
--abstract-unix-socket'[Connect via abstract Unix domain socket]':'' \
--pinnedpubkey'[FILE/HASHES Public key to verify peer against]':'' \
--proxy-insecure'[Do HTTPS proxy connections without verifying the proxy]' \
--proxy-pass'[Pass phrase for the private key for HTTPS proxy]':'' \
--proxy-ssl-allow-beast'[Allow security flaw for interop for HTTPS proxy]' \
{-p,--proxytunnel}'[Operate through an HTTP proxy tunnel (using CONNECT)]' \
--proto-default'[Use PROTOCOL for any URL missing a scheme]':'' \
--proxy-tls13-ciphers'[TLS 1.3 proxy cipher suites]':'' \
--socks5-gssapi-service'[SOCKS5 proxy service name for GSS-API]':'' \
--ftp-alternative-to-user'[String to replace USER \[name\]]':'' \
{-T,--upload-file}'[Transfer local FILE to destination]':'':_files \
--local-port'[Force use of RANGE for local port numbers]':'' \
--proxy-tlsauthtype'[TLS authentication type for HTTPS proxy]':'' \
{-R,--remote-time}'[Set the remote file'\''s time on the local output]' \
--ssl-revoke-best-effort'[Ignore missing/offline cert CRL dist points]' \
--ftp-ssl-control'[Require SSL/TLS for FTP login, clear for transfer]' \
--parallel-immediate'[Do not wait for multiplexing (with --parallel)]' \
--cert-status'[Verify the status of the server cert via OCSP-staple]' \
--proxy-cert-type'[Client certificate type for HTTPS proxy]':'' \
{-O,--remote-name}'[Write output to a file named as the remote file]' \
--retry-connrefused'[Retry on connection refused (use with --retry)]' \
--sasl-authzid'[Identity for SASL PLAIN authentication]':'' \
--suppress-connect-headers'[Suppress proxy CONNECT response headers]' \
--trace-ascii'[Like --trace, but without hex output]':'':_files \
--connect-timeout'[Maximum time allowed for connection]':'' \
--expect100-timeout'[How long to wait for 100-continue]':'' \
{-g,--globoff}'[Disable URL sequences and ranges using {} and \[\]]' \
{-j,--junk-session-cookies}'[Ignore session cookies read from file]' \
{-m,--max-time}'[Maximum time allowed for the transfer]':'' \
--tls13-ciphers'[TLS 1.3 cipher suites to use]':'' \
--dns-ipv4-addr'[IPv4 address to use for DNS requests]':'' \
--dns-ipv6-addr'[IPv6 address to use for DNS requests]':'' \
{-k,--insecure}'[Allow insecure server connections when using SSL]' \
--location-trusted'[Like --location, and send auth to other hosts]' \
--mail-auth'[Originator address of the original email]':'' \
--noproxy'[List of hosts which do not use proxy]':'' \
--proto-redir'[Enable/disable PROTOCOLS on redirect]':'' \
--proxy-cert'[Set client certificate for proxy]':'' \
--create-file-mode'[File mode (octal) for created files]':'' \
--dns-interface'[Interface to use for DNS requests]':'' \
--hostpubmd5'[Acceptable MD5 hash of the host public key]':'' \
--keepalive-time'[Interval time for keepalive probes]':'' \
--preproxy'[\[protocol\://\]host\[\:port\] Use this proxy first]' \
--random-file'[File for reading random data from]':'':_files \
--socks5-basic'[Enable username/password auth for SOCKS5 proxies]' \
--cacert'[CA certificate to verify peer against]':'':_files \
{-H,--header}'[Pass custom header(s) to server]':'' \
--ignore-content-length'[Ignore the size of the remote resource]' \
{-i,--include}'[Include protocol response headers in the output]' \
--proxy-header'[Pass custom header(s) to proxy]':'' \
--unix-socket'[Connect through this Unix domain socket]':'' \
{-w,--write-out}'[Use output FORMAT after completion]':'' \
{-b,--cookie}'[Send cookies from string/file]':'' \
{-o,--output}'[Write to file instead of stdout]':'':_files \
--socks4a'[SOCKS4a proxy on given host + port]':'' \
{-U,--proxy-user}'[Proxy user and password]':'' \
--proxy1.0'[Use HTTP/1.0 proxy on given port]':'' \
{-Y,--speed-limit}'[Stop transfers slower than this]':'' \
{-z,--time-cond}'[Transfer based on a time condition]':'