aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/ssh.bash
blob: c82126146ccf3d920660cebad0df884954ee7d6e (plain)
1
2
3
4
5
6
7
8
9
10
# Completion for ssh(1) with ssh_config(5) hostnames
declare -F _ssh_config_hosts >/dev/null ||
    source "$HOME"/.bash_completion.d/_ssh_config_hosts.bash

# bashdefault requires Bash >=3.0
if ((BASH_VERSINFO[0] >= 3)) ; then
    complete -F _ssh_config_hosts -o bashdefault -o default ssh
else
    complete -F _ssh_config_hosts -o default ssh
fi