diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-01-24 19:24:09 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-01-24 19:24:09 -0300 |
commit | 019f3cc463db63abc6460f97deb488deec43840b (patch) | |
tree | 08cd5387d6c8af6f688d6468c7e2ae9f25c449be /completions/ssh-keygen | |
parent | 5732da2af736c40cf693354485446ab4867ecb4d (diff) | |
download | bash-completion-019f3cc463db63abc6460f97deb488deec43840b.tar.gz |
New upstream version 2.10upstream/2.10
Diffstat (limited to 'completions/ssh-keygen')
-rw-r--r-- | completions/ssh-keygen | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/completions/ssh-keygen b/completions/ssh-keygen index 5c449fc0..36fa2cad 100644 --- a/completions/ssh-keygen +++ b/completions/ssh-keygen @@ -42,7 +42,12 @@ _ssh_keygen() return ;; -*t) - COMPREPLY=( $(compgen -W 'dsa ecdsa ed25519 rsa rsa1' -- "$cur") ) + local protocols=$(_xfunc ssh _ssh_query "$1" protocol-version) + local types='dsa ecdsa ed25519 rsa' + if [[ $protocols == *1* ]]; then + types+=' rsa1' + fi + COMPREPLY=( $(compgen -W "$types" -- "$cur") ) return ;; esac |