I've got the "bash-completion" package installed.
ssh
completion on the command line (in bash
) is working: ssh TAB-TAB
will complete past used hosts and ssh -TAB-TAB
will complete available ssh
options.
However when I search for currently defined completions:
$ complete | grep ssh
complete -F _known_hosts ssh-installkeys
complete -F _service /etc/init.d/ssh
... I find that there's no completion registered for ssh
?!
complete -p ssh
bash: complete: ssh: no completion specification
When I check the ssh
completions script under /usr/share/bash-completion/completions/ssh
then I see that indeed it does register ssh
completions:
$ grep complete /usr/share/bash-completion/completions/ssh | grep ssh | grep -v '^#'
shopt -u hostcomplete && complete -F _ssh ssh slogin autossh sidedoor
So why doesn't the ssh completion show up in complete | grep ssh
? How does bash complete the ssh
options?