Skip to content

Commit

Permalink
feat(ssh-keyscan): complete -O argument
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 4, 2024
1 parent 81b0f8c commit 39ea543
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion completions/ssh-keyscan
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_comp_cmd_ssh_keyscan()
{
local cur prev words cword comp_args
_comp_initialize -- "$@" || return
_comp_initialize -n = -- "$@" || return

local ipvx

Expand All @@ -18,6 +18,20 @@ _comp_cmd_ssh_keyscan()
_comp_compgen_filedir
return
;;
-*O)
case $cur in
hashalg=*)
cur=${cur#*=}
_comp_compgen -- -W 'sha1 sha256'
;;
*=*) ;;
*)
_comp_compgen -- -W 'hashalg='
compopt -o nospace
;;
esac
return
;;
-*p | -*T)
return
;;
Expand Down

0 comments on commit 39ea543

Please sign in to comment.