/bash_completion_lib/complete/arpspoof

http://github.com/brinkman83/bashrc · #! · 37 lines · 27 code · 10 blank · 0 comment · 0 complexity · b8a193eb60ab5a1b2e9abd5524c2fc86 MD5 · raw file

  1. # dsniff util completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
  2. #
  3. # $Id: dsniff,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
  4. # arpspoof(8) completion
  5. comp_include _get_cword _known_hosts
  6. _arpspoof()
  7. {
  8. local cur
  9. COMPREPLY=()
  10. cur=`_get_cword`
  11. prev=${COMP_WORDS[COMP_CWORD-1]}
  12. case "$prev" in
  13. -i)
  14. _interfaces
  15. return 0
  16. ;;
  17. -t)
  18. _known_hosts
  19. return 0
  20. ;;
  21. esac
  22. if [[ "$cur" == -* ]]; then
  23. COMPREPLY=( $( compgen -W '-i -t' -- $cur ) )
  24. else
  25. _known_hosts
  26. fi
  27. } # _arpspoof()