blob: 2e35e7bd7f88330193269aaae8ba7f2dfc51b095 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Completion tools for Nagscripts suite
_nagscripts_objects() {
local word=${COMP_WORDS[COMP_CWORD]}
local -a objects
while read -r object ; do
objects=("${objects[@]}" "$object")
done < <(cat <(nds .) <(nds -s .))
COMPREPLY=( $(compgen -W "${objects[*]}" -- "$word") )
return
}
complete -F _nagscripts_objects -o default \
nagios-acknowledge \
nagios-data-search \
nagios-downstream-list \
nagios-downtime \
nagios-exists \
nagios-force-check
|