support de la complétion pour rwoinst -w
This commit is contained in:
parent
e4b7714799
commit
f8f731e3ed
|
@ -1,13 +1,21 @@
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
function __nutools_host_completion() {
|
function __nutools_host_completion() {
|
||||||
local cur prev
|
local cur prev; _get_comp_words_by_ref cur prev
|
||||||
_get_comp_words_by_ref cur prev
|
[ "$prev" == "-h" -o "$prev" == "-H" -o "$prev" == "--host" ] && _known_hosts_real "$cur"
|
||||||
if [ "$prev" == "-h" -o "$prev" == "-H" ]; then
|
return 0
|
||||||
|
}
|
||||||
|
function __nutools_whost_completion() {
|
||||||
|
local cur prev; _get_comp_words_by_ref cur prev
|
||||||
|
if [ "$prev" == "-h" -o "$prev" == "-H" -o "$prev" == "--host" ]; then
|
||||||
|
_known_hosts_real "$cur"
|
||||||
|
elif [ "$prev" == "-w" -o "$prev" == "--whost" ]; then
|
||||||
_known_hosts_real "$cur"
|
_known_hosts_real "$cur"
|
||||||
fi
|
fi
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
complete -F __nutools_host_completion -o default uinst ruinst runs rruns rwoinst rtoinst
|
complete -F __nutools_host_completion -o default uinst ruinst runs rruns rwoinst rtoinst
|
||||||
|
complete -F __nutools_whost_completion -o default rwoinst
|
||||||
|
|
||||||
if __bash_completion_module_enabled ssh; then
|
if __bash_completion_module_enabled ssh; then
|
||||||
shopt -u hostcomplete
|
shopt -u hostcomplete
|
||||||
|
|
Loading…
Reference in New Issue