File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ _comp_cmd_curl()
22
22
--happy-eyeballs-timeout-ms | --hostpubmd5 | --keepalive-time | \
23
23
--limit-rate | --local-port | --login-options | --mail-auth | \
24
24
--mail-from | --mail-rcpt | --max-filesize | --max-redirs | \
25
- --max-time | --pass | --proto | --proto-default | --proto- redir | \
25
+ --max-time | --pass | --proto | --proto-redir | \
26
26
--proxy-ciphers | --proxy-pass | --proxy-service-name | \
27
27
--proxy-tls13-ciphers | --proxy-tlspassword | --proxy-tlsuser | \
28
28
--proxy-user | --proxy1.0 | --quote | --range | --referer | \
@@ -127,6 +127,9 @@ _comp_cmd_curl()
127
127
_comp_compgen_known_hosts -- " $cur "
128
128
return
129
129
;;
130
+ --proto-default)
131
+ _comp_compgen_split " $( " $1 " --version 2> /dev/null | command sed -e ' /Protocols/!d' -e ' s/Protocols://' ) "
132
+ ;;
130
133
--pubkey)
131
134
_comp_compgen -x ssh identityfile pub
132
135
return
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ def test_data_atfile_dir(self, completion):
27
27
assert completion == "d/"
28
28
assert not completion .endswith (" " )
29
29
30
+ @pytest .mark .complete ("curl --proto-default " , require_cmd = True )
31
+ def test_proto_default (self , completion ):
32
+ assert completion
33
+
30
34
@pytest .mark .complete ("curl --dont-fail-in-unset-mode" )
31
35
def test_unknown_option (self , completion ):
32
36
# Just see that it does not error out
You can’t perform that action at this time.
0 commit comments