diff options
Diffstat (limited to 'bash/bash_completion.d/sftp.bash')
-rw-r--r-- | bash/bash_completion.d/sftp.bash | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bash/bash_completion.d/sftp.bash b/bash/bash_completion.d/sftp.bash index 5d52c739..60044e41 100644 --- a/bash/bash_completion.d/sftp.bash +++ b/bash/bash_completion.d/sftp.bash @@ -1,4 +1,10 @@ # Completion for sftp(1) with ssh_config(5) hostnames declare -F _ssh_config_hosts >/dev/null || source "$HOME"/.bash_completion.d/_ssh_config_hosts.bash -complete -F _ssh_config_hosts -o default sftp + +# bashdefault requires Bash >=3.0 +if ((BASH_VERSINFO[0] >= 3)) ; then + complete -F _ssh_config_hosts -o bashdefault -o default sftp +else + complete -F _ssh_config_hosts -o default sftp +fi |