/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
1.1
contrib/munin-node
103 строки
2 KB
Guillaume Rousse
new indentation policy
04 окт 2009, 21:42
04 окт 2009, 21:42
506e1cb
Код
Авторство
О чём код?
# bash completion for munin node have munin-run && _munin-run() { local cur prev COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} case $prev in --@(config|sconffile)) _filedir return 0 ;; --@(service|sconf)dir) _filedir -d return 0 ;; esac if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '--config --servicedir --sconfdir \ --sconffile --help --debug --version' -- "$cur" ) ) else COMPREPLY=( $( compgen -W '$( command ls /etc/munin/plugins )' \ -- "$cur" ) ) fi } && complete -F _munin-run munin-run have munin-update && _munin-update() { local cur prev COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} case $prev in --config) _filedir return 0 ;; --host) _known_hosts_real "$cur" return 0 ;; esac if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '--force-root --[no]force-root \ --service --host --config --help --debug --nodebug \ --fork --nofork --stdout --nostdout --timeout' -- "$cur" ) ) fi } && complete -F _munin-update munin-update have munin-node-configure && _munin-node-configure() { local cur prev COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} case $prev in --config) _filedir return 0 ;; --@(service|lib)dir) _filedir -d return 0 ;; --snmp) _known_hosts_real "$cur" return 0 ;; --snmpversion) COMPREPLY=( $( compgen -W '1 2c 3' -- "$cur" ) ) return 0 ;; esac if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '--help --version --debug --config \ --servicedir --libdir --families --suggest --shell \ --remove-also --snmp --snmpversion --snmpcommunity' -- "$cur" ) ) fi } && complete -F _munin-node-configure munin-node-configure # Local variables: # mode: shell-script # sh-basic-offset: 4 # sh-indent-comment: t # indent-tabs-mode: nil # End: # ex: ts=4 sw=4 et filetype=sh