# Linux iwspy(8) completion


comp_include _available_interfaces _get_cword


_iwspy()
{
    local cur

    COMPREPLY=()
    cur=`_get_cword`

    if [ $COMP_CWORD -eq 1 ]; then
        if [[ "$cur" == -* ]]; then
            COMPREPLY=( $( compgen -W '--help --version' -- $cur ) ) 
        else
            _available_interfaces -w
        fi
    else
        COMPREPLY=( $( compgen -W 'setthr getthr off' -- $cur ) ) 
    fi
} # _iwspy()
