__app="comp-cab-setup"

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

    opts="
    registration
    poweroff
    poweron
    authorize
    reboot
    end-session
    lock-session
    close-browsers
    show-hostnames
    get-works
    open-browser
    internet-off
    internet-on
    input-off
    input-on
    help
    "

    if [[ ${cur} == * ]]; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
    fi
}

complete -F _mycommand ${__app}
