home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / munin-node < prev    next >
Encoding:
Text File  |  2010-11-16  |  2.4 KB  |  114 lines

  1. # bash completion for munin node
  2.  
  3. have munin-run &&
  4. _munin_run()
  5. {
  6.     local cur prev
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     case $prev in
  12.         --config|--sconffile)
  13.             _filedir
  14.             return 0
  15.             ;;
  16.         --servicedir|--sconfdir)
  17.             _filedir -d
  18.             return 0
  19.             ;;
  20.     esac
  21.  
  22.     if [[ "$cur" == -* ]]; then
  23.         COMPREPLY=( $( compgen -W '--config --servicedir --sconfdir \
  24.             --sconffile --help --debug --version' -- "$cur" ) )
  25.     else
  26.         COMPREPLY=( $( compgen -W '$( command ls /etc/munin/plugins )' \
  27.             -- "$cur" ) )
  28.     fi
  29. } &&
  30. complete -F _munin_run munin-run
  31.  
  32. have munindoc &&
  33. _munindoc()
  34. {
  35.     local cur prev
  36.  
  37.     COMPREPLY=()
  38.     _get_comp_words_by_ref cur prev
  39.  
  40.     COMPREPLY=( $( compgen -W '$( command ls /usr/share/munin/plugins )' \
  41.         -- "$cur" ) )
  42. } &&
  43. complete -F _munindoc munindoc
  44.  
  45. have munin-update &&
  46. _munin_update()
  47. {
  48.     local cur prev
  49.  
  50.     COMPREPLY=()
  51.     _get_comp_words_by_ref cur prev
  52.  
  53.     case $prev in
  54.         --config)
  55.             _filedir
  56.             return 0
  57.             ;;
  58.         --host)
  59.             _known_hosts_real "$cur"
  60.             return 0
  61.             ;;
  62.     esac
  63.  
  64.     if [[ "$cur" == -* ]]; then
  65.         COMPREPLY=( $( compgen -W '--force-root --[no]force-root \
  66.             --service --host --config --help --debug --nodebug \
  67.             --fork --nofork --stdout --nostdout --timeout' -- "$cur" ) )
  68.     fi
  69. } &&
  70. complete -F _munin_update munin-update
  71.  
  72. have munin-node-configure &&
  73. _munin_node_configure()
  74. {
  75.     local cur prev
  76.  
  77.     COMPREPLY=()
  78.     _get_comp_words_by_ref cur prev
  79.  
  80.     case $prev in
  81.         --config)
  82.             _filedir
  83.             return 0
  84.             ;;
  85.         --servicedir|--libdir)
  86.             _filedir -d
  87.             return 0
  88.             ;;
  89.         --snmp)
  90.             _known_hosts_real "$cur"
  91.             return 0
  92.             ;;
  93.         --snmpversion)
  94.             COMPREPLY=( $( compgen -W '1 2c 3' -- "$cur" ) )
  95.             return 0
  96.             ;;
  97.     esac
  98.  
  99.     if [[ "$cur" == -* ]]; then
  100.         COMPREPLY=( $( compgen -W '--help --version --debug --config \
  101.             --servicedir --libdir --families --suggest --shell \
  102.             --remove-also --snmp --snmpversion --snmpcommunity' -- "$cur" ) )
  103.     fi
  104. } &&
  105. complete -F _munin_node_configure munin-node-configure
  106.  
  107. # Local variables:
  108. # mode: shell-script
  109. # sh-basic-offset: 4
  110. # sh-indent-comment: t
  111. # indent-tabs-mode: nil
  112. # End:
  113. # ex: ts=4 sw=4 et filetype=sh
  114.