Skip to content

Commit 5099cef

Browse files
committed
feat(curl): more option argument (non-)completions
1 parent 2c5d14b commit 5099cef

File tree

1 file changed

+35
-16
lines changed

1 file changed

+35
-16
lines changed

completions-core/curl.bash

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,31 @@ _comp_cmd_curl()
1111
--abstract-unix-socket | --alt-svc | --config | --cookie | \
1212
--cookie-jar | --dump-header | --egd-file | --etag-compare | \
1313
--etag-save | --hsts | --key | --libcurl | --netrc-file | \
14-
--output | --proxy-key | --random-file | --unix-socket | \
15-
--upload-file | -${noargopts}[KbcDoT])
14+
--output | --proxy-key | --random-file | --ssl-sessions | \
15+
--unix-socket | --upload-file | -${noargopts}[KbcDoT])
1616
_comp_compgen_filedir
1717
return
1818
;;
19-
--ciphers | --connect-timeout | --connect-to | --continue-at | \
20-
--curves | --data-raw | --doh-url | --expect100-timeout | --form | \
21-
--form-string | --ftp-account | --ftp-alternative-to-user | \
22-
--happy-eyeballs-timeout-ms | --hostpubmd5 | --keepalive-time | \
19+
--aws-sigv4 | --ciphers | --connect-timeout | --connect-to | \
20+
--continue-at | --curves | --data-raw | --doh-url | \
21+
--expect100-timeout | --form | --form-string | --ftp-account | \
22+
--ftp-alternative-to-user | --haproxy-clientip | \
23+
--happy-eyeballs-timeout-ms | --hostpubmd5 | --hostpubsha256 | \
24+
--ipfs-gateway | --keepalive-cnt | --keepalive-time | \
2325
--limit-rate | --local-port | --login-options | --mail-auth | \
2426
--mail-from | --mail-rcpt | --max-filesize | --max-redirs | \
25-
--max-time | --pass | --proto | --proto-redir | \
26-
--proxy-ciphers | --proxy-pass | --proxy-service-name | \
27-
--proxy-tls13-ciphers | --proxy-tlspassword | --proxy-tlsuser | \
28-
--proxy-user | --proxy1.0 | --quote | --range | --referer | \
29-
--resolve | --retry | --retry-delay | --retry-max-time | \
30-
--sasl-authzid | --service-name | --socks5-gssapi-service | \
31-
--speed-limit | --speed-time | --telnet-option | --tftp-blksize | \
32-
--time-cond | --tls13-ciphers | --tlspassword | --tlsuser | \
33-
--url | --user | --user-agent | --version | \
27+
--max-time | --oauth2-bearer | --parallel-max | --pass | \
28+
--proto | --proto-redir | --proxy-ciphers | --proxy-pass | \
29+
--proxy-service-name | --proxy-tls13-ciphers | \
30+
--proxy-tlspassword | --proxy-tlsuser | --proxy-user | \
31+
--proxy1.0 | --quote | --range | --rate | --referer | \
32+
--request-target | --resolve | --retry | --retry-delay | \
33+
--retry-max-time | --sasl-authzid | --service-name | --sigalgs | \
34+
--socks5-gssapi-service | --speed-limit | --speed-time | \
35+
--telnet-option | --tftp-blksize | --time-cond | \
36+
--tls13-ciphers | --trace-config | --tlspassword | --tlsuser | \
37+
--upload-flags | --url | --url-query | --user | --user-agent | \
38+
--variable | --version | --vlan-priority | \
3439
-${noargopts}[CFmQreYytzuAV])
3540
return
3641
;;
@@ -43,7 +48,11 @@ _comp_cmd_curl()
4348
return
4449
;;
4550
--cert-type | --key-type | --proxy-cert-type | --proxy-key-type)
46-
_comp_compgen -- -W 'DER PEM ENG'
51+
local -a types=(DER PEM ENG)
52+
if [[ $prev == --cert-type ]]; then
53+
types+=(PROV P12)
54+
fi
55+
_comp_compgen -- -W '"${types[@]}"'
4756
return
4857
;;
4958
--crlfile | --proxy-crlfile)
@@ -66,6 +75,10 @@ _comp_cmd_curl()
6675
_comp_compgen -- -W 'none policy always'
6776
return
6877
;;
78+
--dns-interface)
79+
_comp_compgen_available_interfaces -a
80+
return
81+
;;
6982
--dns-ipv[46]-addr)
7083
_comp_compgen_ip_addresses -"${prev:9:1}"
7184
return
@@ -76,6 +89,12 @@ _comp_cmd_curl()
7689
_comp_delimited , -W '"${COMPREPLY[@]}"'
7790
return
7891
;;
92+
--ech)
93+
_comp_compgen -- -W 'false grease true hard ecl: pn:'
94+
[[ ${COMPREPLY-} == *: ]] && compopt -o nospace
95+
_comp_ltrim_colon_completions "$cur"
96+
return
97+
;;
7998
--engine)
8099
local engines=$(
81100
"$1" --engine list 2>/dev/null |

0 commit comments

Comments
 (0)