fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
0df6fa791
master
1# Complete paths after @ in options: 2function __curl_complete_data 3string match -qr'^(?<prefix>.*@)(?<path>.*)' --( commandline -ct) 4printf '%s\n' --$prefix ( __fish_complete_path $path ) 5end 6complete -c curl -n'string match -qr "@" -- (commandline -ct)' -kxa"(__curl_complete_data)" 7 8# The remaining are based off the autogenerated completions. 9complete -c curl -l abstract-unix-socket -d'(HTTP) Connect through an abstract Unix domain socket' 10complete -c curl -l anyauth -d'(HTTP) Use most secure authentication method automatically' 11complete -c curl -s a -l append -d'(FTP SFTP) Upload: append to the target file' 12complete -c curl -l basic -d'(HTTP) Use HTTP Basic authentication' 13complete -c curl -l cacert -d'(TLS) Use the specified certificate file' 14complete -c curl -l capath -d'(TLS) Use the specified certificate directory' 15complete -c curl -l cert-status -d'(TLS) Use Certificate Status Request (aka OCSP stapling)' 16complete -c curl -l cert-type -d'(TLS) Set type of the provided client certificate' -a'PEM, DER ENG P12' 17complete -c curl -s E -l cert -d'(TLS) Use this cert' 18complete -c curl -l ciphers -d'(TLS) Specifies which ciphers to use' 19complete -c curl -l compressed-ssh -d'(SCP SFTP) Enables built-in SSH compression' 20complete -c curl -l compressed -d'(HTTP) Request a compressed response' 21complete -c curl -s K -l config -d'Specify a text file to read curl arguments from' 22complete -c curl -l connect-timeout -d'Maximum time in seconds you allow connection to take' 23complete -c curl -l connect-to -d'For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead' 24complete -c curl -s C -l continue-at -d'Continue/Resume a previous file transfer at the given offset' 25complete -c curl -s c -l cookie-jar -d'(HTTP) Write all cookies to this file' 26complete -c curl -s b -l cookie -d'(HTTP) Pass the data to the HTTP server in the Cookie header' 27complete -c curl -l create-dirs -d'Create dirs for -o/--output' 28complete -c curl -l crlf -d'(FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390)' 29complete -c curl -l crlfile -d'(TLS) Provide a file using PEM format with a Certificate Revocation List' 30complete -c curl -l data-ascii -d'(HTTP) Alias for -d, --data' 31complete -c curl -l data-binary -d'(HTTP) Post data exactly as specified with no processing' 32complete -c curl -l data-raw -d'(HTTP) Post data like --data but without interpreting "@"' 33complete -c curl -l data-urlencode -d'(HTTP) Post data URL-encoded' 34complete -c curl -s d -l data -d'(HTTP) Sends the specified data in a POST request to the HTTP server' 35complete -c curl -l delegation -d'(GSS/kerberos) Tell the server how much it can delegate for user creds' -xa'( 36printf %s\t%s\n \ 37none "Don\'t allow any delegation" \ 38policy "Delegate only if the OK-AS-DELEGATE flag is set in the Kerberos service ticket" \ 39always "Allow the server to delegate")' 40complete -c curl -l digest -d'(HTTP) Enables HTTP Digest authentication' 41complete -c curl -l disable-eprt -d'(FTP) Don\'t use EPRT and LPRT commands in active FTP' 42complete -c curl -l disable-epsv -d'(FTP) Don\'t use EPSV in passive FTP' 43complete -c curl -s q -l disable -d'Disable curlrc' 44complete -c curl -l disallow-username-in-url -d'(HTTP) Exit if passed a url containing a username' 45complete -c curl -l dns-interface -d'(DNS) Send outgoing DNS requests through <interface>' 46complete -c curl -l dns-ipv4-addr -d'(DNS) Bind to <ip-address> when making IPv4 DNS requests' 47complete -c curl -l dns-ipv6-addr -d'(DNS) Bind to <ip-address> when making IPv6 DNS requests' 48complete -c curl -l dns-servers -d'Set the list of DNS servers to use' 49complete -c curl -l doh-url -d'(all) Specify which DNS-over-HTTPS (DOH) server to use to resolve hostnames' 50complete -c curl -s D -l dump-header -d'(HTTP FTP) Write the received protocol headers to the specified file' 51complete -c curl -l egd-file -d'(TLS) Specify the path name to the Entropy Gathering Daemon socket' 52complete -c curl -l engine -d'(TLS) Select the OpenSSL crypto engine to use for cipher operations' 53complete -c curl -l expect100-timeout -d'(HTTP) Maximum time in seconds to wait for a 100-continue' 54complete -c curl -l fail-early -d'Fail and exit on the first detected transfer error' 55complete -c curl -s f -l fail -d'(HTTP) Fail silently (no output at all) on server errors' 56complete -c curl -l false-start -d'(TLS) Use false start during the TLS handshake' 57complete -c curl -l form-string -d'(HTTP SMTP IMAP) Like --form except using value string literally' 58complete -c curl -s F -l form -d'(HTTP SMTP IMAP) Emulate pressing submit on filled-in form' 59complete -c curl -l ftp-account -d'(FTP) Data for the ACCT command' 60complete -c curl -l ftp-alternative-to-user -d'(FTP) If USER and PASS commands fail, send this command' 61complete -c curl -l ftp-create-dirs -d'(FTP SFTP) Create missing dirs with ftp' 62complete -c curl -l ftp-method -d'(FTP) Control what method curl should use to reach a file on an FTP(S) server' 63complete -c curl -l ftp-pasv -d'(FTP) Use passive mode for the data connection' 64complete -c curl -s P -l ftp-port -d'(FTP) Reverses the default initiator/listener roles when connecting with FTP' 65complete -c curl -l ftp-pret -d'(FTP) Tell curl to send a PRET command before PASV (and EPSV)' 66complete -c curl -l ftp-skip-pasv-ip -d'(FTP) Use same IP instead of IP the server suggests in response to PASV' 67complete -c curl -l ftp-ssl-ccc-mode -d'(FTP) Sets the CCC mode' 68complete -c curl -l ftp-ssl-ccc -d'(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after auth' 69complete -c curl -l ftp-ssl-control -d'(FTP) Require SSL/TLS for the FTP login, clear for transfer' 70complete -c curl -s G -l get -d'Use GET instead of POST' 71complete -c curl -s g -l globoff -d'This option switches off the "URL globbing parser"' 72complete -c curl -l happy-eyeballs-timeout-ms -d'Attempt to connect to both IPv4 and IPv6 in parallel' 73complete -c curl -l haproxy-protocol -d'(HTTP) Use HAProxy PROXY protocol' 74complete -c curl -s I -l head -d'(HTTP FTP FILE) Fetch the headers only' 75complete -c curl -s H -l header -d'(HTTP) Extra header to include in the request when sending HTTP to a server' 76complete -c curl -s h -l help -d'Usage help' 77complete -c curl -l hostpubmd5 -d'(SFTP SCP) Pass a string containing 32 hexadecimal digits' 78complete -c curl -l'http0.9' -d'(HTTP) Accept HTTP version 0.9 response' 79complete -c curl -s0 -l'http1.0' -d'(HTTP) Use HTTP version 1' 80complete -c curl -l'http1.1' -d'(HTTP) Use HTTP version 1.1' 81complete -c curl -l http2-prior-knowledge -d'(HTTP) Use HTTP/2 immediately (without trying HTTP1)' 82complete -c curl -l http2 -d'(HTTP) Use HTTP version 2' 83complete -c curl -l ignore-content-length -d'(FTP HTTP) Ignore the Content-Length header' 84complete -c curl -s i -l include -d'Include the HTTP response headers in the output' 85complete -c curl -s k -l insecure -d'(TLS) Allow insecure connections' 86complete -c curl -l interface -d'Perform an operation using a specified interface' 87complete -c curl -s4 -l ipv4 -d'Use IPv4 only' 88complete -c curl -s6 -l ipv6 -d'Use IPv6 only' 89complete -c curl -s j -l junk-session-cookies -d'(HTTP) Discard all session cookies' 90complete -c curl -l keepalive-time -d'Specify idle time before keepalive is sent' 91complete -c curl -l key-type -d'(TLS) Private key file type' -xa'DER PEM ENG' 92complete -c curl -l key -d'(TLS SSH) Private key file name' 93complete -c curl -l krb -d'(FTP) Enable Kerberos authentication and use' 94complete -c curl -l libcurl -d'Write C-code equivalent to the invocation to the given file' 95complete -c curl -l limit-rate -d'Limit bandwidth (Examples: 200K, 3m and 1G)' 96complete -c curl -s l -l list-only -d'(FTP POP3) (FTP) Use name-only view when listing' 97complete -c curl -l local-port -d'Set a preferred single number or range (FROM-TO) of local ports to use' 98complete -c curl -l location-trusted -d'(HTTP) Like -L, --location, but allow sending the name + password' 99complete -c curl -s L -l location -d'(HTTP) Follow redirects' 100complete -c curl -l login-options -d'(IMAP POP3 SMTP) Specify the login options' 101complete -c curl -l mail-auth -d'(SMTP) Specify a single address' 102complete -c curl -l mail-from -d'(SMTP) Specify a single address that the given mail should get sent from' 103complete -c curl -l mail-rcpt -d'(SMTP) Specify a single address, user name or mailing list name' 104complete -c curl -s M -l manual -d'Manual. Display the huge help text' 105complete -c curl -l max-filesize -d'Specify the maximum size (in bytes) of a file to download' 106complete -c curl -l max-redirs -d'(HTTP) Set maximum number of redirection-followings allowed' 107complete -c curl -s m -l max-time -d'Maximum time in seconds that you allow the whole operation to take' 108complete -c curl -l metalink -d'Process URI as Metalink file' 109complete -c curl -l negotiate -d'(HTTP) Enables Negotiate (SPNEGO) authentication' 110complete -c curl -l netrc-file -d'Use this netrc file' 111complete -c curl -l netrc-optional -d'Make netrc optional' 112complete -c curl -s n -l netrc -d'Use ~/.netrc' 113complete -c curl -l next -d'Use a separate operation for the following URL' 114complete -c curl -l no-alpn -d'(HTTPS) Disable the ALPN TLS extension' 115complete -c curl -s N -l no-buffer -d'Disable the buffering of the output stream' 116complete -c curl -l no-keepalive -d'Disable use of keepalive messages on the TCP connection' 117complete -c curl -l no-npn -d'(HTTPS) Disable NPN TLS extension' 118complete -c curl -l no-sessionid -d'(TLS) Disable use of SSL session-ID caching' 119complete -c curl -l noproxy -d'Comma-separated list of hosts which do not use a proxy' 120complete -c curl -l ntlm-wb -d'(HTTP) Enable NTLM, but hand over auth to separate ntlmauth binary' 121complete -c curl -l ntlm -d'(HTTP) Enable NTLM authentication' 122complete -c curl -l oauth2-bearer -d'(IMAP POP3 SMTP) Specify the Bearer Token for OAUTH 2' 123complete -c curl -s o -l output -d'Write output to <file> instead of stdout' 124complete -c curl -l output-dir -xa"(__fish_complete_directories)" -d'Directory in which files should be stored when used with -o/--output' 125complete -c curl -l pass -d'(SSH TLS) Passphrase for the private key' 126complete -c curl -l path-as-is -d'Do not handle sequences of /../ or /./ in the given URL path' 127complete -c curl -l pinnedpubkey -d'(TLS) Use the specified public key file (or hashes)' 128complete -c curl -l post301 -d'(HTTP) Respect RFC 7231/6.4' 129complete -c curl -l post302 -d'(HTTP) Respect RFC 7231/6.4' 130complete -c curl -l post303 -d'(HTTP) Violate RFC 7231/6.4' 131complete -c curl -l preproxy -d'Use the specified SOCKS proxy before connecting to HTTP(S) proxy' 132complete -c curl -s'#' -l progress-bar -d'Display progress as a simple progress bar' 133complete -c curl -l proto-default -d'Use this protocol for any URL missing a scheme name' 134complete -c curl -l proto-redir -d'Limit what protocols it may use on redirect' 135# TODO: args 136complete -c curl -l proto -d'Limit what protocols it may use in the transfer' 137complete -c curl -l proxy-anyauth -d'Like --anyauth but for the proxy' 138complete -c curl -l proxy-basic -d'Use HTTP Basic authentication to communicate with proxy' 139complete -c curl -l proxy-cacert -d'Same as --cacert but used in HTTPS proxy context' 140complete -c curl -l proxy-capath -d'Same as --capath but used in HTTPS proxy context' 141complete -c curl -l proxy-cert-type -d'Same as --cert-type but used in HTTPS proxy context' 142complete -c curl -l proxy-cert -d'Same as -E, --cert but used in HTTPS proxy context' 143complete -c curl -l proxy-ciphers -d'Same as --ciphers but used in HTTPS proxy context' 144complete -c curl -l proxy-crlfile -d'Same as --crlfile but used in HTTPS proxy context' 145complete -c curl -l proxy-digest -d'Use HTTP Digest authentication to communicate with proxy' 146complete -c curl -l proxy-header -d'(HTTP) Extra header to include in the request when sending HTTP to a proxy' 147complete -c curl -l proxy-insecure -d'Same as -k, --insecure but used in HTTPS proxy context' 148complete -c curl -l proxy-key-type -d'Same as --key-type but used in HTTPS proxy context' 149complete -c curl -l proxy-key -d'Same as --key but used in HTTPS proxy context' 150complete -c curl -l proxy-negotiate -d'Use HTTP Negotiate authentication to communicate with proxy' 151complete -c curl -l proxy-ntlm -d'Use HTTP NTLM authentication when to communicate with proxy' 152complete -c curl -l proxy-pass -d'Same as --pass but used in HTTPS proxy context' 153complete -c curl -l proxy-pinnedpubkey -d'(TLS) Use specified public key file or hashes to verify proxy' 154complete -c curl -l proxy-service-name -d'This option allows you to change the service name for proxy negotiation' 155complete -c curl -l proxy-ssl-allow-beast -d'Same as --ssl-allow-beast but used in HTTPS proxy context' 156complete -c curl -l proxy-tls13-ciphers -d'(TLS) Specify cipher suites for TLS 1.3 proxy connection' 157complete -c curl -l proxy-tlsauthtype -d'Same as --tlsauthtype but used in HTTPS proxy context' 158complete -c curl -l proxy-tlspassword -d'Same as --tlspassword but used in HTTPS proxy context' 159complete -c curl -l proxy-tlsuser -d'Same as --tlsuser but used in HTTPS proxy context' 160complete -c curl -l proxy-tlsv1 -d'Same as -1, --tlsv1 but used in HTTPS proxy context' 161complete -c curl -s U -l proxy-user -d'Specify the user name and password to use for proxy authentication' 162complete -c curl -s x -l proxy -d'Use the specified proxy' 163complete -c curl -l'proxy1.0' -d'Use the specified HTTP 1.0 proxy' 164complete -c curl -s p -l proxytunnel -d'If HTTP proxy is used, make curl tunnel through it' 165complete -c curl -l pubkey -d'(SFTP SCP) Public key file name' 166complete -c curl -s Q -l quote -d'(FTP SFTP) Send an arbitrary command to the remote FTP or SFTP server' 167complete -c curl -l random-file -d'Specify file containing random data' 168complete -c curl -s r -l range -d'(HTTP FTP SFTP FILE) Retrieve a byte range' 169complete -c curl -o500 -d'specifies the last 500 bytes' 170complete -c curl -s1 -d'specifies the first and last byte only(*)(HTTP)' 171complete -c curl -l raw -d'(HTTP) Pass raw data (no HTTP decoding or transfer encoding)' 172complete -c curl -s e -l referer -d'(HTTP) Sends the "Referrer Page" information to the HTTP server' 173complete -c curl -s J -l remote-header-name -d'(HTTP) Save output to filename from Content-Disposition' 174complete -c curl -l remote-name-all -d'For every URL write output to local file by default' 175complete -c curl -s O -l remote-name -d'Write output to a local file named like the remote file we get' 176complete -c curl -s R -l remote-time -d'Use timestamp of remote file on output' 177complete -c curl -l request-target -d'(HTTP) Use an alternative request target' 178complete -c curl -x -s X -l request -d'(HTTP) Specifies a custom HTTP method' -a'GET HEAD POST PUT DELETE CONNECT OPTIONS TRACE PATCH' 179complete -c curl -l resolve -d'Provide a custom address for a specific host and port pair' 180complete -c curl -l retry-connrefused -d'Consider ECONNREFUSED a transient error' 181complete -c curl -l retry-delay -d'Time to wait between transfer retries' 182complete -c curl -l retry-max-time -d'The retry timer is reset before the first transfer attempt' 183complete -c curl -l retry -d'Number of retries when transient error occurs' 184complete -c curl -l sasl-ir -d'Enable initial response in SASL authentication' 185complete -c curl -l service-name -d'This option allows you to change the service name for SPNEGO' 186complete -c curl -s S -l show-error -d'When used with -s, --silent, it makes curl show an error message if it fails' 187complete -c curl -s s -l silent -d'Silent or quiet mode. Don\'t show progress meter or error messages' 188complete -c curl -l socks4 -d'Use the specified SOCKS4 proxy' 189complete -c curl -l socks4a -d'Use the specified SOCKS4a proxy' 190complete -c curl -l socks5-basic -d'Use username/password authentication to connect to SOCKS5 proxy' 191complete -c curl -l socks5-gssapi-nec -d'As part of the GSS-API negotiation a protection mode is negotiated' 192complete -c curl -l socks5-gssapi-service -d'The default service name for a socks server is rcmd/server-fqdn' 193complete -c curl -l socks5-gssapi -d'Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy' 194complete -c curl -l socks5-hostname -d'Use the specified SOCKS5 proxy (and let the proxy resolve the host name)' 195complete -c curl -l socks5 -d'Use the specified SOCKS5 proxy - but resolve the host name locally' 196complete -c curl -s Y -l speed-limit -d'Abort download if it\'s slower than given speed (Bps) for speed-time' 197complete -c curl -s y -l speed-time -d'Abort download if it\'s slower than speed for given speed-time (s)' 198complete -c curl -l ssl-allow-beast -d'Don\'t work around BEAST security flaw in SSL3 and TLS1.0' 199complete -c curl -l ssl-no-revoke -d'(Schannel) This option tells curl to disable certificate revocation checks' 200complete -c curl -l ssl-reqd -d'(FTP IMAP POP3 SMTP) Require SSL/TLS for the connection' 201complete -c curl -l ssl -d'(FTP IMAP POP3 SMTP) Try to use SSL/TLS for the connection' 202complete -c curl -s2 -l sslv2 -d'(SSL) Use SSL version 2' 203complete -c curl -s3 -l sslv3 -d'(SSL) Use SSL version 3' 204complete -c curl -l stderr -d'Redirect all writes to stderr to the specified file instead' 205complete -c curl -l styled-output -d'Use bold font styles when writing HTTP headers to terminal' 206complete -c curl -l suppress-connect-headers -d'Don\'t print response headers for CONNECT request if -p is set' 207complete -c curl -l tcp-fastopen -d'Enable use of TCP Fast Open' 208complete -c curl -l tcp-nodelay -d'Turn on the TCP_NODELAY option' 209complete -c curl -s t -l telnet-option -d'Pass options to the telnet protocol' 210complete -c curl -l tftp-blksize -d'(TFTP) Set TFTP BLKSIZE option (must be >512)' 211complete -c curl -l tftp-no-options -d'(TFTP) Tells curl not to send TFTP options requests' 212complete -c curl -s z -l time-cond -d'(HTTP FTP) Request file modified before or later than given time' 213complete -c curl -l tls-max -d'(SSL) VERSION defines maximum supported TLS version' 214complete -c curl -l tls13-ciphers -d'(TLS) Specifies cipher suites to use for TLS 1.3' 215complete -c curl -l tlsauthtype -d'Set TLS authentication type' 216complete -c curl -l tlspassword -d'Set password for use with the TLS authentication method' 217complete -c curl -l tlsuser -d'Set username for use with the TLS authentication method' 218complete -c curl -l'tlsv1.0' -d'(TLS) Forces curl to use TLS version 1.0' 219complete -c curl -l'tlsv1.1' -d'(TLS) Forces curl to use TLS version 1.1' 220complete -c curl -l'tlsv1.2' -d'(TLS) Forces curl to use TLS version 1.2' 221complete -c curl -l'tlsv1.3' -d'(TLS) Forces curl to use TLS version 1.3' 222complete -c curl -l tlsv1 -d'(SSL) Tells curl to use at least TLS version 1' 223complete -c curl -l tr-encoding -d'(HTTP) Request compressed Transfer-Encoding, uncompress on receive' 224complete -c curl -l trace-ascii -d'Enables a full trace dump of all incoming and outgoing data' 225complete -c curl -l trace-time -d'Prepends a time stamp to each trace or verbose line that curl displays' 226complete -c curl -l trace -d'Enables a full trace dump of all incoming and outgoing data' 227complete -c curl -l unix-socket -d'(HTTP) Connect through this Unix domain socket, instead of using the network' 228complete -c curl -s T -l upload-file -d'This transfers the specified local file to the remote URL' 229complete -c curl -l url -d'Specify a URL to fetch' 230complete -c curl -s B -l use-ascii -d'(FTP LDAP) Enable ASCII transfer' 231complete -c curl -s A -l user-agent -d'(HTTP) Specify the User-Agent string to send to the HTTP server' 232complete -c curl -s u -l user -d'Specify the user name and password to use for server authentication' 233complete -c curl -s v -l verbose -d'Makes curl verbose during the operation' 234complete -c curl -s V -l version -d'Displays information about curl and the libcurl version it uses' 235complete -c curl -s w -l write-out -d'Make curl display information on stdout after a completed transfer' 236complete -c curl -l eprt -l no-eprt -d'for --disable-eprt' 237complete -c curl -l epsv -l no-epsv -d'for --disable-epsv' 238complete -c curl -l max-redir -d'Set maximum number of redirects' 239complete -c curl -l xattr -d'Store metadata in xattrs (like origin URL)' 240complete -c curl -l url-query -d'(HTTP) Add a URL query part'