_pgp-sig2dot-cli() {
    local i cur prev opts cmd
    COMPREPLY=()
    if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
        cur="$2"
    else
        cur="${COMP_WORDS[COMP_CWORD]}"
    fi
    prev="$3"
    cmd=""
    opts=""

    for i in "${COMP_WORDS[@]:0:COMP_CWORD}"
    do
        case "${cmd},${i}" in
            ",$1")
                cmd="pgp__sig2dot__cli"
                ;;
            pgp__sig2dot__cli,cli)
                cmd="pgp__sig2dot__cli__cli"
                ;;
            pgp__sig2dot__cli,draw)
                cmd="pgp__sig2dot__cli__draw"
                ;;
            pgp__sig2dot__cli,fetch)
                cmd="pgp__sig2dot__cli__fetch"
                ;;
            pgp__sig2dot__cli,help)
                cmd="pgp__sig2dot__cli__help"
                ;;
            pgp__sig2dot__cli__cli,complete)
                cmd="pgp__sig2dot__cli__cli__complete"
                ;;
            pgp__sig2dot__cli__cli,help)
                cmd="pgp__sig2dot__cli__cli__help"
                ;;
            pgp__sig2dot__cli__cli,manpage)
                cmd="pgp__sig2dot__cli__cli__manpage"
                ;;
            pgp__sig2dot__cli__cli__help,complete)
                cmd="pgp__sig2dot__cli__cli__help__complete"
                ;;
            pgp__sig2dot__cli__cli__help,help)
                cmd="pgp__sig2dot__cli__cli__help__help"
                ;;
            pgp__sig2dot__cli__cli__help,manpage)
                cmd="pgp__sig2dot__cli__cli__help__manpage"
                ;;
            pgp__sig2dot__cli__help,cli)
                cmd="pgp__sig2dot__cli__help__cli"
                ;;
            pgp__sig2dot__cli__help,draw)
                cmd="pgp__sig2dot__cli__help__draw"
                ;;
            pgp__sig2dot__cli__help,fetch)
                cmd="pgp__sig2dot__cli__help__fetch"
                ;;
            pgp__sig2dot__cli__help,help)
                cmd="pgp__sig2dot__cli__help__help"
                ;;
            pgp__sig2dot__cli__help__cli,complete)
                cmd="pgp__sig2dot__cli__help__cli__complete"
                ;;
            pgp__sig2dot__cli__help__cli,manpage)
                cmd="pgp__sig2dot__cli__help__cli__manpage"
                ;;
            *)
                ;;
        esac
    done

    case "${cmd}" in
        pgp__sig2dot__cli)
            opts="-v -q -h -V --verbose --quiet --help --version cli draw fetch help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli)
            opts="-v -q -h --verbose --quiet --help manpage complete help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli__complete)
            opts="-v -q -h --output --verbose --quiet --help bash elvish fish powershell zsh"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --output)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli__help)
            opts="manpage complete help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli__help__complete)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli__help__help)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli__help__manpage)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__cli__manpage)
            opts="-v -q -h --path --verbose --quiet --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --path)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__draw)
            opts="-p -k -i -t -v -q -h --show-primary-uid-only --show-self-sigs --fingerprint --import --online --keyserver --gossip --trust-root --type --verbose --quiet --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --fingerprint)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -k)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --import)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -i)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --keyserver)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --gossip)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --trust-root)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --type)
                    COMPREPLY=($(compgen -W "DOT METADATA KEY_BLOCK MAP42" -- "${cur}"))
                    return 0
                    ;;
                -t)
                    COMPREPLY=($(compgen -W "DOT METADATA KEY_BLOCK MAP42" -- "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__fetch)
            opts="-v -q -h --keyserver --from --verbose --quiet --help <INPUT>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --keyserver)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --from)
                    COMPREPLY=($(compgen -W "key-server wkd github all" -- "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help)
            opts="cli draw fetch help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help__cli)
            opts="manpage complete"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help__cli__complete)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help__cli__manpage)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help__draw)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help__fetch)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        pgp__sig2dot__cli__help__help)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
    esac
}

if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
    complete -F _pgp-sig2dot-cli -o nosort -o bashdefault -o default pgp-sig2dot-cli
else
    complete -F _pgp-sig2dot-cli -o bashdefault -o default pgp-sig2dot-cli
fi
