diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-02-12 00:07:27 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-02-12 00:07:27 +1300 |
commit | 2d69a56b9d1314658de29ace609a11d312a66130 (patch) | |
tree | 90487e5ea7baf315ea0a7db673cf701b86a36839 /bash/bash_completion.d/ftp.bash | |
parent | Break a long line (diff) | |
download | dotfiles-2d69a56b9d1314658de29ace609a11d312a66130.tar.gz dotfiles-2d69a56b9d1314658de29ace609a11d312a66130.zip |
Use bashdefault if available in more completions
Diffstat (limited to 'bash/bash_completion.d/ftp.bash')
-rw-r--r-- | bash/bash_completion.d/ftp.bash | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bash/bash_completion.d/ftp.bash b/bash/bash_completion.d/ftp.bash index e6d292a9..335d711a 100644 --- a/bash/bash_completion.d/ftp.bash +++ b/bash/bash_completion.d/ftp.bash @@ -30,4 +30,10 @@ _ftp() { COMPREPLY[${#COMPREPLY[@]}]=$machine done } -complete -F _ftp -o default ftp + +# bashdefault requires Bash >=3.0 +if ((BASH_VERSINFO[0] >= 3)) ; then + complete -F _ftp -o bashdefault -o default ftp +else + complete -F _ftp -o default ftp +fi |