2015-03-18 16:55:12 +04:00
|
|
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
|
|
|
|
|
|
|
function __nutools_host_completion() {
|
|
|
|
local cur prev
|
|
|
|
_get_comp_words_by_ref cur prev
|
|
|
|
if [ "$prev" == "-h" -o "$prev" == "-H" ]; then
|
|
|
|
_known_hosts_real "$cur"
|
|
|
|
fi
|
|
|
|
}
|
2015-03-23 05:08:27 +04:00
|
|
|
complete -F __nutools_host_completion -o default ruinst runs rruns
|
2015-03-18 16:55:12 +04:00
|
|
|
|
2015-03-23 05:08:27 +04:00
|
|
|
if __bash_completion_module_enabled ssh; then
|
2015-03-18 16:55:12 +04:00
|
|
|
shopt -u hostcomplete
|
|
|
|
complete -F _ssh ussh cssh
|
|
|
|
fi
|