_nitrokey_app()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="--help --version --debug --debug-file --debug-window --delay --version-more --admin --language-list --language"

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

}
complete -F _nitrokey_app nitrokey-app
