# bash completion for check_snmp_printer_tray                -*- shell-script -*-

_check_snmp_printer_tray()
{
    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
            ;;
        -P)
            mapfile -t COMPREPLY < <(compgen -W '1 2c 3' -- "$cur")
            return
            ;;
        -w | -c | -t | -d)
            return
            ;;
    esac

    # no positional arguments: offer the options
    mapfile -t COMPREPLY < <(compgen -W '-h -w -c -H -t -d -P -v' -- "$cur")
}
complete -F _check_snmp_printer_tray check_snmp_printer_tray
