# bash completion for check_dd-wrt_ps                        -*- shell-script -*-

_check_dd_wrt_ps()
{
    local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
    COMPREPLY=()

    case $prev in
        -H)
            mapfile -t COMPREPLY < <(compgen -A hostname -- "$cur")
            return
            ;;
        -t | -a)
            return
            ;;
    esac

    # no positional arguments: offer the options
    mapfile -t COMPREPLY < <(compgen -W '-H -t -a' -- "$cur")
}
complete -F _check_dd_wrt_ps check_dd-wrt_ps
