summaryrefslogtreecommitdiffstats
path: root/completions/curl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:24:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:24:27 +0000
commit6c18848a903eb3ee06dccd915859ce64195c257c (patch)
treeea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /completions/curl
parentInitial commit. (diff)
downloadbash-completion-6c18848a903eb3ee06dccd915859ce64195c257c.tar.xz
bash-completion-6c18848a903eb3ee06dccd915859ce64195c257c.zip
Adding upstream version 1:2.11.upstream/1%2.11
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/curl')
-rw-r--r--completions/curl99
1 files changed, 99 insertions, 0 deletions
diff --git a/completions/curl b/completions/curl
new file mode 100644
index 0000000..6e84269
--- /dev/null
+++ b/completions/curl
@@ -0,0 +1,99 @@
+# curl(1) completion -*- shell-script -*-
+
+_curl()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ --ciphers | --connect-timeout | --continue-at | --form | --form-string | \
+ --ftp-account | --ftp-alternative-to-user | --ftp-port | --header | --help | \
+ --hostpubmd5 | --keepalive-time | --krb | --limit-rate | --local-port | \
+ --mail-from | --mail-rcpt | --max-filesize | --max-redirs | --max-time | --pass | \
+ --proto | --proto-redir | --proxy-user | --proxy1.0 | --quote | --range | \
+ --request | --retry | --retry-delay | --retry-max-time | \
+ --socks5-gssapi-service | --telnet-option | --tftp-blksize | --time-cond | \
+ --url | --user | --user-agent | --version | --write-out | --resolve | --tlsuser | \
+ --tlspassword | -!(-*)[CFPHhmQrXtzuAVw])
+ return
+ ;;
+ --config | --cookie | --cookie-jar | --dump-header | --egd-file | \
+ --key | --libcurl | --output | --random-file | --upload-file | --trace | \
+ --trace-ascii | --netrc-file | -!(-*)[KbcDoT])
+ _filedir
+ return
+ ;;
+ --cacert | --cert | -!(-*)E)
+ _filedir '@(c?(e)rt|cer|pem|der)'
+ return
+ ;;
+ --capath)
+ _filedir -d
+ return
+ ;;
+ --cert-type | --key-type)
+ COMPREPLY=($(compgen -W 'DER PEM ENG' -- "$cur"))
+ return
+ ;;
+ --crlfile)
+ _filedir crl
+ return
+ ;;
+ --data | --data-ascii | --data-binary | --data-urlencode | -!(-*)d)
+ if [[ $cur == \@* ]]; then
+ cur=${cur:1}
+ _filedir
+ if [[ ${#COMPREPLY[@]} -eq 1 && -d ${COMPREPLY[0]} ]]; then
+ COMPREPLY[0]+=/
+ compopt -o nospace
+ fi
+ COMPREPLY=("${COMPREPLY[@]/#/@}")
+ fi
+ return
+ ;;
+ --delegation)
+ COMPREPLY=($(compgen -W 'none policy always' -- "$cur"))
+ return
+ ;;
+ --engine)
+ COMPREPLY=($(compgen -W 'list' -- "$cur"))
+ return
+ ;;
+ --ftp-method)
+ COMPREPLY=($(compgen -W 'multicwd nocwd singlecwd' -- "$cur"))
+ return
+ ;;
+ --ftp-ssl-ccc-mode)
+ COMPREPLY=($(compgen -W 'active passive' -- "$cur"))
+ return
+ ;;
+ --interface)
+ _available_interfaces -a
+ return
+ ;;
+ --proxy | --socks4 | --socks4a | --socks5 | --socks5-hostname | -!(-*)x)
+ _known_hosts_real -- "$cur"
+ return
+ ;;
+ --pubkey)
+ _xfunc ssh _ssh_identityfile pub
+ return
+ ;;
+ --stderr)
+ COMPREPLY=($(compgen -W '-' -- "$cur"))
+ _filedir
+ return
+ ;;
+ --tlsauthtype)
+ COMPREPLY=($(compgen -W 'SRP' -- "$cur"))
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ fi
+} &&
+ complete -F _curl curl
+
+# ex: filetype=sh