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 / tcpdump < prev    next >
Encoding:
Text File  |  2010-11-16  |  683 b   |  38 lines

  1. # bash completion for tcpdump
  2.  
  3. have tcpdump &&
  4. _tcpdump()
  5. {
  6.     local cur prev
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     case $prev in
  12.         -r|-w|-F)
  13.             _filedir
  14.             return 0
  15.             ;;
  16.         -i)
  17.             _available_interfaces -a
  18.             return 0
  19.             ;;
  20.     esac
  21.  
  22.  
  23.     if [[ "$cur" == -* ]]; then
  24.         COMPREPLY=( $( compgen -W '-a -d -e -f -l -n -N -O -p \
  25.             -q -R -S -t -u -v -x -C -F -i -m -r -s -T -w -E' -- "$cur" ) )
  26.     fi
  27.  
  28. } &&
  29. complete -F _tcpdump tcpdump
  30.  
  31. # Local variables:
  32. # mode: shell-script
  33. # sh-basic-offset: 4
  34. # sh-indent-comment: t
  35. # indent-tabs-mode: nil
  36. # End:
  37. # ex: ts=4 sw=4 et filetype=sh
  38.