PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/bash_completion_lib/complete/tcpdump

http://github.com/brinkman83/bashrc
#! | 30 lines | 23 code | 7 blank | 0 comment | 0 complexity | 741430d7cdd9074fe6632fa053ffaf66 MD5 | raw file
 1comp_include _available_interfaces _filedir _get_cword
 2
 3
 4_tcpdump()
 5{
 6    local cur
 7
 8    COMPREPLY=()
 9    cur=`_get_cword`
10    prev=${COMP_WORDS[COMP_CWORD-1]}
11
12    case "$prev" in
13        -@(r|w|F))
14            _filedir
15            return 0
16            ;;
17        -i)
18            _available_interfaces -a
19            return 0
20            ;;
21    esac
22
23
24    if [[ "$cur" == -* ]]; then
25        COMPREPLY=( $( compgen -W '-a -d -e -f -l -n -N -O -p \
26            -q -R -S -t -u -v -x -C -F -i -m -r -s -T -w \
27            -E' -- $cur ) )
28    fi
29
30}