Skip to content

Commit 4269a90

Browse files
committed
feat(ssh-keygen): update -t arg completions
Add rsa-sha2-256, rsa-sha2-512, and ssh-rsa.
1 parent a73bcaf commit 4269a90

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

completions/ssh-keygen

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,14 @@ _comp_cmd_ssh_keygen()
145145
local pathcmd protocols
146146
pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH
147147
_comp_compgen -v protocols -x ssh query protocol-version
148-
local types='dsa ecdsa ecdsa-sk ed25519 ed25519-sk rsa'
148+
local -a types=(
149+
dsa ecdsa ecdsa-sk ed25519 ed25519-sk rsa
150+
rsa-sha2-256 rsa-sha2-512 ssh-rsa
151+
)
149152
if [[ ${protocols[*]} == *1* ]]; then
150-
types+=' rsa1'
153+
types+=(rsa1)
151154
fi
152-
_comp_compgen -- -W "$types"
155+
_comp_compgen -- -W '"${types[@]}"'
153156
return
154157
;;
155158
-${noargopts}Y)

0 commit comments

Comments
 (0)