/bash_completion_lib/complete/tcpnice

http://github.com/brinkman83/bashrc · #! · 25 lines · 18 code · 7 blank · 0 comment · 0 complexity · 38817ea7b9a0702fdc43455b05ba55a8 MD5 · raw file

  1. # tcpnice(8) completion
  2. comp_include _get_cword
  3. _tcpnice()
  4. {
  5. local cur
  6. COMPREPLY=()
  7. cur=`_get_cword`
  8. prev=${COMP_WORDS[COMP_CWORD-1]}
  9. case "$prev" in
  10. -i)
  11. _interfaces
  12. return 0
  13. ;;
  14. esac
  15. if [[ "$cur" == -* ]]; then
  16. COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) )
  17. fi
  18. } # _tcpnice()