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 / ifupdown < prev    next >
Encoding:
Text File  |  2010-11-16  |  596 b   |  28 lines

  1. # Red Hat & Debian GNU/Linux if{up,down} completion
  2. #
  3. [ $USERLAND = GNU ] && { have ifup || have ifdown; } &&
  4. _ifupdown()
  5. {
  6.     local cur
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur
  10.  
  11.     if [ $COMP_CWORD -eq 1 ]; then
  12.         _configured_interfaces
  13.         COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
  14.     fi
  15.  
  16.     return 0
  17. } &&
  18. complete -F _ifupdown ifup ifdown
  19. [ $USERLAND = GNU ] && have ifstatus && complete -F _ifupdown ifstatus
  20.  
  21. # Local variables:
  22. # mode: shell-script
  23. # sh-basic-offset: 4
  24. # sh-indent-comment: t
  25. # indent-tabs-mode: nil
  26. # End:
  27. # ex: ts=4 sw=4 et filetype=sh
  28.