# this was auto-generated by OpenSC/doc/tools/Makefile.am
_pkcs15_tool()
{
    COMPREPLY=()
    local cur prev split=false
    _get_comp_words_by_ref cur prev

    _split_longopt && split=true

    opts="		-a --aid --auth-id -c -C --change-pin --clear-cache -D --dump -k --list-applications --list-certificates --list-data-objects --list-info --list-keys --list-pins --list-public-keys --list-secret-keys --new-pin --no-cache -o --output --pin --puk -r -R --raw --read-certificate --read-data-object --reader --read-public-key --read-ssh-key --rfc4716 -s --short -T --test-session-pin --test-update -u -U --unblock-pin --update --use-pinpad -v --verbose --verify-pin --version -w --wait "

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

    case "${prev}" in
        		!*)
            _filedir so
            return 0
            ;;
        		-o|--output)
            _filedir
            return 0
            ;;
        		-a|--aid|--auth-id|--new-pin|-o|--output|--pin|--puk|-r|-R|--read-certificate|--read-data-object|--reader|--read-public-key|--read-ssh-key)
            return 0
            ;;
        *)
            COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
            return 0
            ;;
    esac

    $split && return 0

    if [[ "$cur" == -* ]]; then
        _longopt $1
        return
    fi

    _filedir
}
complete -F _pkcs15_tool pkcs15-tool


# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh
