Skip to content

Commit 39ea543

Browse files
committed
feat(ssh-keyscan): complete -O argument
1 parent 81b0f8c commit 39ea543

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

completions/ssh-keyscan

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
_comp_cmd_ssh_keyscan()
44
{
55
local cur prev words cword comp_args
6-
_comp_initialize -- "$@" || return
6+
_comp_initialize -n = -- "$@" || return
77

88
local ipvx
99

@@ -18,6 +18,20 @@ _comp_cmd_ssh_keyscan()
1818
_comp_compgen_filedir
1919
return
2020
;;
21+
-*O)
22+
case $cur in
23+
hashalg=*)
24+
cur=${cur#*=}
25+
_comp_compgen -- -W 'sha1 sha256'
26+
;;
27+
*=*) ;;
28+
*)
29+
_comp_compgen -- -W 'hashalg='
30+
compopt -o nospace
31+
;;
32+
esac
33+
return
34+
;;
2135
-*p | -*T)
2236
return
2337
;;

0 commit comments

Comments
 (0)