_anchor() {
    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="anchor"
                ;;
            anchor,account)
                cmd="anchor__account"
                ;;
            anchor,address)
                cmd="anchor__address"
                ;;
            anchor,airdrop)
                cmd="anchor__airdrop"
                ;;
            anchor,balance)
                cmd="anchor__balance"
                ;;
            anchor,build)
                cmd="anchor__build"
                ;;
            anchor,clean)
                cmd="anchor__clean"
                ;;
            anchor,cluster)
                cmd="anchor__cluster"
                ;;
            anchor,completions)
                cmd="anchor__completions"
                ;;
            anchor,config)
                cmd="anchor__config"
                ;;
            anchor,deploy)
                cmd="anchor__deploy"
                ;;
            anchor,epoch)
                cmd="anchor__epoch"
                ;;
            anchor,epoch-info)
                cmd="anchor__epoch__info"
                ;;
            anchor,expand)
                cmd="anchor__expand"
                ;;
            anchor,help)
                cmd="anchor__help"
                ;;
            anchor,idl)
                cmd="anchor__idl"
                ;;
            anchor,init)
                cmd="anchor__init"
                ;;
            anchor,keygen)
                cmd="anchor__keygen"
                ;;
            anchor,keys)
                cmd="anchor__keys"
                ;;
            anchor,localnet)
                cmd="anchor__localnet"
                ;;
            anchor,logs)
                cmd="anchor__logs"
                ;;
            anchor,migrate)
                cmd="anchor__migrate"
                ;;
            anchor,new)
                cmd="anchor__new"
                ;;
            anchor,program)
                cmd="anchor__program"
                ;;
            anchor,run)
                cmd="anchor__run"
                ;;
            anchor,shell)
                cmd="anchor__shell"
                ;;
            anchor,show-account)
                cmd="anchor__show__account"
                ;;
            anchor,test)
                cmd="anchor__test"
                ;;
            anchor,upgrade)
                cmd="anchor__upgrade"
                ;;
            anchor,verify)
                cmd="anchor__verify"
                ;;
            anchor__cluster,help)
                cmd="anchor__cluster__help"
                ;;
            anchor__cluster,list)
                cmd="anchor__cluster__list"
                ;;
            anchor__cluster__help,help)
                cmd="anchor__cluster__help__help"
                ;;
            anchor__cluster__help,list)
                cmd="anchor__cluster__help__list"
                ;;
            anchor__config,get)
                cmd="anchor__config__get"
                ;;
            anchor__config,help)
                cmd="anchor__config__help"
                ;;
            anchor__config,set)
                cmd="anchor__config__set"
                ;;
            anchor__config__help,get)
                cmd="anchor__config__help__get"
                ;;
            anchor__config__help,help)
                cmd="anchor__config__help__help"
                ;;
            anchor__config__help,set)
                cmd="anchor__config__help__set"
                ;;
            anchor__help,account)
                cmd="anchor__help__account"
                ;;
            anchor__help,address)
                cmd="anchor__help__address"
                ;;
            anchor__help,airdrop)
                cmd="anchor__help__airdrop"
                ;;
            anchor__help,balance)
                cmd="anchor__help__balance"
                ;;
            anchor__help,build)
                cmd="anchor__help__build"
                ;;
            anchor__help,clean)
                cmd="anchor__help__clean"
                ;;
            anchor__help,cluster)
                cmd="anchor__help__cluster"
                ;;
            anchor__help,completions)
                cmd="anchor__help__completions"
                ;;
            anchor__help,config)
                cmd="anchor__help__config"
                ;;
            anchor__help,deploy)
                cmd="anchor__help__deploy"
                ;;
            anchor__help,epoch)
                cmd="anchor__help__epoch"
                ;;
            anchor__help,epoch-info)
                cmd="anchor__help__epoch__info"
                ;;
            anchor__help,expand)
                cmd="anchor__help__expand"
                ;;
            anchor__help,help)
                cmd="anchor__help__help"
                ;;
            anchor__help,idl)
                cmd="anchor__help__idl"
                ;;
            anchor__help,init)
                cmd="anchor__help__init"
                ;;
            anchor__help,keygen)
                cmd="anchor__help__keygen"
                ;;
            anchor__help,keys)
                cmd="anchor__help__keys"
                ;;
            anchor__help,localnet)
                cmd="anchor__help__localnet"
                ;;
            anchor__help,logs)
                cmd="anchor__help__logs"
                ;;
            anchor__help,migrate)
                cmd="anchor__help__migrate"
                ;;
            anchor__help,new)
                cmd="anchor__help__new"
                ;;
            anchor__help,program)
                cmd="anchor__help__program"
                ;;
            anchor__help,run)
                cmd="anchor__help__run"
                ;;
            anchor__help,shell)
                cmd="anchor__help__shell"
                ;;
            anchor__help,show-account)
                cmd="anchor__help__show__account"
                ;;
            anchor__help,test)
                cmd="anchor__help__test"
                ;;
            anchor__help,upgrade)
                cmd="anchor__help__upgrade"
                ;;
            anchor__help,verify)
                cmd="anchor__help__verify"
                ;;
            anchor__help__cluster,list)
                cmd="anchor__help__cluster__list"
                ;;
            anchor__help__config,get)
                cmd="anchor__help__config__get"
                ;;
            anchor__help__config,set)
                cmd="anchor__help__config__set"
                ;;
            anchor__help__idl,build)
                cmd="anchor__help__idl__build"
                ;;
            anchor__help__idl,close)
                cmd="anchor__help__idl__close"
                ;;
            anchor__help__idl,convert)
                cmd="anchor__help__idl__convert"
                ;;
            anchor__help__idl,create-buffer)
                cmd="anchor__help__idl__create__buffer"
                ;;
            anchor__help__idl,fetch)
                cmd="anchor__help__idl__fetch"
                ;;
            anchor__help__idl,init)
                cmd="anchor__help__idl__init"
                ;;
            anchor__help__idl,set-buffer-authority)
                cmd="anchor__help__idl__set__buffer__authority"
                ;;
            anchor__help__idl,type)
                cmd="anchor__help__idl__type"
                ;;
            anchor__help__idl,upgrade)
                cmd="anchor__help__idl__upgrade"
                ;;
            anchor__help__idl,write-buffer)
                cmd="anchor__help__idl__write__buffer"
                ;;
            anchor__help__keygen,new)
                cmd="anchor__help__keygen__new"
                ;;
            anchor__help__keygen,pubkey)
                cmd="anchor__help__keygen__pubkey"
                ;;
            anchor__help__keygen,recover)
                cmd="anchor__help__keygen__recover"
                ;;
            anchor__help__keygen,verify)
                cmd="anchor__help__keygen__verify"
                ;;
            anchor__help__keys,list)
                cmd="anchor__help__keys__list"
                ;;
            anchor__help__keys,sync)
                cmd="anchor__help__keys__sync"
                ;;
            anchor__help__program,close)
                cmd="anchor__help__program__close"
                ;;
            anchor__help__program,deploy)
                cmd="anchor__help__program__deploy"
                ;;
            anchor__help__program,dump)
                cmd="anchor__help__program__dump"
                ;;
            anchor__help__program,extend)
                cmd="anchor__help__program__extend"
                ;;
            anchor__help__program,set-buffer-authority)
                cmd="anchor__help__program__set__buffer__authority"
                ;;
            anchor__help__program,set-upgrade-authority)
                cmd="anchor__help__program__set__upgrade__authority"
                ;;
            anchor__help__program,show)
                cmd="anchor__help__program__show"
                ;;
            anchor__help__program,upgrade)
                cmd="anchor__help__program__upgrade"
                ;;
            anchor__help__program,write-buffer)
                cmd="anchor__help__program__write__buffer"
                ;;
            anchor__idl,build)
                cmd="anchor__idl__build"
                ;;
            anchor__idl,close)
                cmd="anchor__idl__close"
                ;;
            anchor__idl,convert)
                cmd="anchor__idl__convert"
                ;;
            anchor__idl,create-buffer)
                cmd="anchor__idl__create__buffer"
                ;;
            anchor__idl,fetch)
                cmd="anchor__idl__fetch"
                ;;
            anchor__idl,help)
                cmd="anchor__idl__help"
                ;;
            anchor__idl,init)
                cmd="anchor__idl__init"
                ;;
            anchor__idl,set-buffer-authority)
                cmd="anchor__idl__set__buffer__authority"
                ;;
            anchor__idl,type)
                cmd="anchor__idl__type"
                ;;
            anchor__idl,upgrade)
                cmd="anchor__idl__upgrade"
                ;;
            anchor__idl,write-buffer)
                cmd="anchor__idl__write__buffer"
                ;;
            anchor__idl__help,build)
                cmd="anchor__idl__help__build"
                ;;
            anchor__idl__help,close)
                cmd="anchor__idl__help__close"
                ;;
            anchor__idl__help,convert)
                cmd="anchor__idl__help__convert"
                ;;
            anchor__idl__help,create-buffer)
                cmd="anchor__idl__help__create__buffer"
                ;;
            anchor__idl__help,fetch)
                cmd="anchor__idl__help__fetch"
                ;;
            anchor__idl__help,help)
                cmd="anchor__idl__help__help"
                ;;
            anchor__idl__help,init)
                cmd="anchor__idl__help__init"
                ;;
            anchor__idl__help,set-buffer-authority)
                cmd="anchor__idl__help__set__buffer__authority"
                ;;
            anchor__idl__help,type)
                cmd="anchor__idl__help__type"
                ;;
            anchor__idl__help,upgrade)
                cmd="anchor__idl__help__upgrade"
                ;;
            anchor__idl__help,write-buffer)
                cmd="anchor__idl__help__write__buffer"
                ;;
            anchor__keygen,help)
                cmd="anchor__keygen__help"
                ;;
            anchor__keygen,new)
                cmd="anchor__keygen__new"
                ;;
            anchor__keygen,pubkey)
                cmd="anchor__keygen__pubkey"
                ;;
            anchor__keygen,recover)
                cmd="anchor__keygen__recover"
                ;;
            anchor__keygen,verify)
                cmd="anchor__keygen__verify"
                ;;
            anchor__keygen__help,help)
                cmd="anchor__keygen__help__help"
                ;;
            anchor__keygen__help,new)
                cmd="anchor__keygen__help__new"
                ;;
            anchor__keygen__help,pubkey)
                cmd="anchor__keygen__help__pubkey"
                ;;
            anchor__keygen__help,recover)
                cmd="anchor__keygen__help__recover"
                ;;
            anchor__keygen__help,verify)
                cmd="anchor__keygen__help__verify"
                ;;
            anchor__keys,help)
                cmd="anchor__keys__help"
                ;;
            anchor__keys,list)
                cmd="anchor__keys__list"
                ;;
            anchor__keys,sync)
                cmd="anchor__keys__sync"
                ;;
            anchor__keys__help,help)
                cmd="anchor__keys__help__help"
                ;;
            anchor__keys__help,list)
                cmd="anchor__keys__help__list"
                ;;
            anchor__keys__help,sync)
                cmd="anchor__keys__help__sync"
                ;;
            anchor__program,close)
                cmd="anchor__program__close"
                ;;
            anchor__program,deploy)
                cmd="anchor__program__deploy"
                ;;
            anchor__program,dump)
                cmd="anchor__program__dump"
                ;;
            anchor__program,extend)
                cmd="anchor__program__extend"
                ;;
            anchor__program,help)
                cmd="anchor__program__help"
                ;;
            anchor__program,set-buffer-authority)
                cmd="anchor__program__set__buffer__authority"
                ;;
            anchor__program,set-upgrade-authority)
                cmd="anchor__program__set__upgrade__authority"
                ;;
            anchor__program,show)
                cmd="anchor__program__show"
                ;;
            anchor__program,upgrade)
                cmd="anchor__program__upgrade"
                ;;
            anchor__program,write-buffer)
                cmd="anchor__program__write__buffer"
                ;;
            anchor__program__help,close)
                cmd="anchor__program__help__close"
                ;;
            anchor__program__help,deploy)
                cmd="anchor__program__help__deploy"
                ;;
            anchor__program__help,dump)
                cmd="anchor__program__help__dump"
                ;;
            anchor__program__help,extend)
                cmd="anchor__program__help__extend"
                ;;
            anchor__program__help,help)
                cmd="anchor__program__help__help"
                ;;
            anchor__program__help,set-buffer-authority)
                cmd="anchor__program__help__set__buffer__authority"
                ;;
            anchor__program__help,set-upgrade-authority)
                cmd="anchor__program__help__set__upgrade__authority"
                ;;
            anchor__program__help,show)
                cmd="anchor__program__help__show"
                ;;
            anchor__program__help,upgrade)
                cmd="anchor__program__help__upgrade"
                ;;
            anchor__program__help,write-buffer)
                cmd="anchor__program__help__write__buffer"
                ;;
            *)
                ;;
        esac
    done

    case "${cmd}" in
        anchor)
            opts="-h -V --provider.cluster --provider.wallet --commitment --help --version init build expand verify test new idl clean deploy migrate upgrade airdrop cluster config shell run keys localnet account completions address balance epoch epoch-info logs show-account keygen program help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__account)
            opts="-h --idl --provider.cluster --provider.wallet --commitment --help <ACCOUNT_TYPE> <ADDRESS>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --idl)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__address)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__airdrop)
            opts="-h --provider.cluster --provider.wallet --commitment --help <AMOUNT> [PUBKEY]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__balance)
            opts="-h --lamports --provider.cluster --provider.wallet --commitment --help [PUBKEY]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__build)
            opts="-i -t -v -p -s -d -b -e -h --skip-lint --ignore-keys --no-idl --idl --idl-ts --verifiable --program-name --solana-version --docker-image --bootstrap --env --no-docs --provider.cluster --provider.wallet --commitment --help [CARGO_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --idl)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -i)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --idl-ts)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -t)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --solana-version)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -s)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --docker-image)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -d)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --bootstrap)
                    COMPREPLY=($(compgen -W "none debian" -- "${cur}"))
                    return 0
                    ;;
                -b)
                    COMPREPLY=($(compgen -W "none debian" -- "${cur}"))
                    return 0
                    ;;
                --env)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -e)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__clean)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__cluster)
            opts="-h --provider.cluster --provider.wallet --commitment --help list help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__cluster__help)
            opts="list 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
            ;;
        anchor__cluster__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
            ;;
        anchor__cluster__help__list)
            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
            ;;
        anchor__cluster__list)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__completions)
            opts="-h --provider.cluster --provider.wallet --commitment --help bash elvish fish powershell zsh"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__config)
            opts="-h --provider.cluster --provider.wallet --commitment --help get set help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__config__get)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__config__help)
            opts="get set 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
            ;;
        anchor__config__help__get)
            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
            ;;
        anchor__config__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
            ;;
        anchor__config__help__set)
            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
            ;;
        anchor__config__set)
            opts="-u -k -h --url --keypair --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --url)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -u)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --keypair)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -k)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__deploy)
            opts="-p -v -h --program-name --program-keypair --verifiable --no-idl --provider.cluster --provider.wallet --commitment --help [SOLANA_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-keypair)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__epoch)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__epoch__info)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__expand)
            opts="-p -h --program-name --provider.cluster --provider.wallet --commitment --help [CARGO_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__help)
            opts="init build expand verify test new idl clean deploy migrate upgrade airdrop cluster config shell run keys localnet account completions address balance epoch epoch-info logs show-account keygen program 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
            ;;
        anchor__help__account)
            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
            ;;
        anchor__help__address)
            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
            ;;
        anchor__help__airdrop)
            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
            ;;
        anchor__help__balance)
            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
            ;;
        anchor__help__build)
            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
            ;;
        anchor__help__clean)
            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
            ;;
        anchor__help__cluster)
            opts="list"
            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
            ;;
        anchor__help__cluster__list)
            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
            ;;
        anchor__help__completions)
            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
            ;;
        anchor__help__config)
            opts="get set"
            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
            ;;
        anchor__help__config__get)
            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
            ;;
        anchor__help__config__set)
            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
            ;;
        anchor__help__deploy)
            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
            ;;
        anchor__help__epoch)
            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
            ;;
        anchor__help__epoch__info)
            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
            ;;
        anchor__help__expand)
            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
            ;;
        anchor__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
            ;;
        anchor__help__idl)
            opts="init upgrade build fetch convert type close create-buffer set-buffer-authority write-buffer"
            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
            ;;
        anchor__help__idl__build)
            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
            ;;
        anchor__help__idl__close)
            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
            ;;
        anchor__help__idl__convert)
            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
            ;;
        anchor__help__idl__create__buffer)
            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
            ;;
        anchor__help__idl__fetch)
            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
            ;;
        anchor__help__idl__init)
            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
            ;;
        anchor__help__idl__set__buffer__authority)
            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
            ;;
        anchor__help__idl__type)
            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
            ;;
        anchor__help__idl__upgrade)
            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
            ;;
        anchor__help__idl__write__buffer)
            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
            ;;
        anchor__help__init)
            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
            ;;
        anchor__help__keygen)
            opts="new pubkey recover verify"
            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
            ;;
        anchor__help__keygen__new)
            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
            ;;
        anchor__help__keygen__pubkey)
            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
            ;;
        anchor__help__keygen__recover)
            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
            ;;
        anchor__help__keygen__verify)
            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
            ;;
        anchor__help__keys)
            opts="list sync"
            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
            ;;
        anchor__help__keys__list)
            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
            ;;
        anchor__help__keys__sync)
            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
            ;;
        anchor__help__localnet)
            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
            ;;
        anchor__help__logs)
            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
            ;;
        anchor__help__migrate)
            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
            ;;
        anchor__help__new)
            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
            ;;
        anchor__help__program)
            opts="deploy write-buffer set-buffer-authority set-upgrade-authority show upgrade dump close extend"
            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
            ;;
        anchor__help__program__close)
            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
            ;;
        anchor__help__program__deploy)
            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
            ;;
        anchor__help__program__dump)
            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
            ;;
        anchor__help__program__extend)
            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
            ;;
        anchor__help__program__set__buffer__authority)
            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
            ;;
        anchor__help__program__set__upgrade__authority)
            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
            ;;
        anchor__help__program__show)
            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
            ;;
        anchor__help__program__upgrade)
            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
            ;;
        anchor__help__program__write__buffer)
            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
            ;;
        anchor__help__run)
            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
            ;;
        anchor__help__shell)
            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
            ;;
        anchor__help__show__account)
            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
            ;;
        anchor__help__test)
            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
            ;;
        anchor__help__upgrade)
            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
            ;;
        anchor__help__verify)
            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
            ;;
        anchor__idl)
            opts="-h --provider.cluster --provider.wallet --commitment --help init upgrade build fetch convert type close create-buffer set-buffer-authority write-buffer help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__build)
            opts="-p -o -t -h --program-name --out --out-ts --no-docs --skip-lint --provider.cluster --provider.wallet --commitment --help [CARGO_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --out)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --out-ts)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -t)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__close)
            opts="-h --seed --priority-fee --provider.cluster --provider.wallet --commitment --help <PROGRAM_ID>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --seed)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority-fee)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__convert)
            opts="-o -p -h --out --program-id --provider.cluster --provider.wallet --commitment --help <PATH>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --out)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-id)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__create__buffer)
            opts="-f -h --filepath --priority-fee --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --filepath)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -f)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority-fee)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__fetch)
            opts="-o -h --out --non-canonical --provider.cluster --provider.wallet --commitment --help <PROGRAM_ID>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --out)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__help)
            opts="init upgrade build fetch convert type close create-buffer set-buffer-authority write-buffer 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
            ;;
        anchor__idl__help__build)
            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
            ;;
        anchor__idl__help__close)
            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
            ;;
        anchor__idl__help__convert)
            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
            ;;
        anchor__idl__help__create__buffer)
            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
            ;;
        anchor__idl__help__fetch)
            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
            ;;
        anchor__idl__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
            ;;
        anchor__idl__help__init)
            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
            ;;
        anchor__idl__help__set__buffer__authority)
            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
            ;;
        anchor__idl__help__type)
            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
            ;;
        anchor__idl__help__upgrade)
            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
            ;;
        anchor__idl__help__write__buffer)
            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
            ;;
        anchor__idl__init)
            opts="-f -h --filepath --priority-fee --non-canonical --provider.cluster --provider.wallet --commitment --help [PROGRAM_ID]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --filepath)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -f)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority-fee)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__set__buffer__authority)
            opts="-n -h --new-authority --priority-fee --provider.cluster --provider.wallet --commitment --help <BUFFER>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --new-authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -n)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority-fee)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__type)
            opts="-o -h --out --provider.cluster --provider.wallet --commitment --help <PATH>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --out)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__upgrade)
            opts="-f -h --filepath --priority-fee --provider.cluster --provider.wallet --commitment --help [PROGRAM_ID]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --filepath)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -f)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority-fee)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__idl__write__buffer)
            opts="-b -h --buffer --seed --close-buffer --priority-fee --provider.cluster --provider.wallet --commitment --help <PROGRAM_ID>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --buffer)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -b)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --seed)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority-fee)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__init)
            opts="-j -t -h --javascript --no-install --package-manager --no-git --template --test-template --force --install-agent-skills --provider.cluster --provider.wallet --commitment --help <NAME>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --package-manager)
                    COMPREPLY=($(compgen -W "npm yarn pnpm bun" -- "${cur}"))
                    return 0
                    ;;
                --template)
                    COMPREPLY=($(compgen -W "single multiple" -- "${cur}"))
                    return 0
                    ;;
                -t)
                    COMPREPLY=($(compgen -W "single multiple" -- "${cur}"))
                    return 0
                    ;;
                --test-template)
                    COMPREPLY=($(compgen -W "mocha jest rust mollusk litesvm" -- "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keygen)
            opts="-h --provider.cluster --provider.wallet --commitment --help new pubkey recover verify help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keygen__help)
            opts="new pubkey recover verify 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
            ;;
        anchor__keygen__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
            ;;
        anchor__keygen__help__new)
            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
            ;;
        anchor__keygen__help__pubkey)
            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
            ;;
        anchor__keygen__help__recover)
            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
            ;;
        anchor__keygen__help__verify)
            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
            ;;
        anchor__keygen__new)
            opts="-o -f -w -h --outfile --force --no-passphrase --silent --word-count --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --outfile)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --word-count)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -w)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keygen__pubkey)
            opts="-h --provider.cluster --provider.wallet --commitment --help [KEYPAIR]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keygen__recover)
            opts="-o -f -h --outfile --force --skip-seed-phrase-validation --no-passphrase --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --outfile)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keygen__verify)
            opts="-h --provider.cluster --provider.wallet --commitment --help <PUBKEY> [KEYPAIR]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keys)
            opts="-h --provider.cluster --provider.wallet --commitment --help list sync help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keys__help)
            opts="list sync 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
            ;;
        anchor__keys__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
            ;;
        anchor__keys__help__list)
            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
            ;;
        anchor__keys__help__sync)
            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
            ;;
        anchor__keys__list)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__keys__sync)
            opts="-p -h --program-name --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__localnet)
            opts="-e -h --skip-build --skip-deploy --skip-lint --ignore-keys --validator --env --provider.cluster --provider.wallet --commitment --help [CARGO_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --validator)
                    COMPREPLY=($(compgen -W "surfpool legacy" -- "${cur}"))
                    return 0
                    ;;
                --env)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -e)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__logs)
            opts="-h --include-votes --address --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --address)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__migrate)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__new)
            opts="-t -h --template --force --provider.cluster --provider.wallet --commitment --help <NAME>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --template)
                    COMPREPLY=($(compgen -W "single multiple" -- "${cur}"))
                    return 0
                    ;;
                -t)
                    COMPREPLY=($(compgen -W "single multiple" -- "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program)
            opts="-h --provider.cluster --provider.wallet --commitment --help deploy write-buffer set-buffer-authority set-upgrade-authority show upgrade dump close extend help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__close)
            opts="-p -h --program-name --authority --recipient --bypass-warning --provider.cluster --provider.wallet --commitment --help [ACCOUNT]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --recipient)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__deploy)
            opts="-p -h --program-name --program-keypair --upgrade-authority --program-id --buffer --max-len --no-idl --final --provider.cluster --provider.wallet --commitment --help [PROGRAM_FILEPATH] [SOLANA_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-keypair)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --upgrade-authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-id)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --buffer)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-len)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__dump)
            opts="-h --provider.cluster --provider.wallet --commitment --help <ACCOUNT> <OUTPUT_FILE>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__extend)
            opts="-p -h --program-name --provider.cluster --provider.wallet --commitment --help [PROGRAM_ID] <ADDITIONAL_BYTES>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__help)
            opts="deploy write-buffer set-buffer-authority set-upgrade-authority show upgrade dump close extend 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
            ;;
        anchor__program__help__close)
            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
            ;;
        anchor__program__help__deploy)
            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
            ;;
        anchor__program__help__dump)
            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
            ;;
        anchor__program__help__extend)
            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
            ;;
        anchor__program__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
            ;;
        anchor__program__help__set__buffer__authority)
            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
            ;;
        anchor__program__help__set__upgrade__authority)
            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
            ;;
        anchor__program__help__show)
            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
            ;;
        anchor__program__help__upgrade)
            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
            ;;
        anchor__program__help__write__buffer)
            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
            ;;
        anchor__program__set__buffer__authority)
            opts="-h --provider.cluster --provider.wallet --commitment --help <BUFFER> <NEW_BUFFER_AUTHORITY>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__set__upgrade__authority)
            opts="-h --new-upgrade-authority --new-upgrade-authority-signer --skip-new-upgrade-authority-signer-check --final --upgrade-authority --provider.cluster --provider.wallet --commitment --help <PROGRAM_ID>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --new-upgrade-authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --new-upgrade-authority-signer)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --upgrade-authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__show)
            opts="-h --get-programs --get-buffers --all --provider.cluster --provider.wallet --commitment --help <ACCOUNT>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__upgrade)
            opts="-p -h --program-filepath --program-name --buffer --upgrade-authority --max-retries --provider.cluster --provider.wallet --commitment --help <PROGRAM_ID> [SOLANA_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-filepath)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --buffer)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --upgrade-authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-retries)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__program__write__buffer)
            opts="-p -h --program-name --buffer --buffer-authority --max-len --provider.cluster --provider.wallet --commitment --help [PROGRAM_FILEPATH]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --buffer)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --buffer-authority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-len)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__run)
            opts="-h --provider.cluster --provider.wallet --commitment --help <SCRIPT> [SCRIPT_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__shell)
            opts="-h --provider.cluster --provider.wallet --commitment --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__show__account)
            opts="-o -h --lamports --output-file --output --provider.cluster --provider.wallet --commitment --help <ACCOUNT_ADDRESS>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --output-file)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --output)
                    COMPREPLY=($(compgen -W "json json-compact" -- "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__test)
            opts="-p -e -h --program-name --skip-deploy --skip-lint --skip-local-validator --skip-build --no-idl --detach --run --validator --env --provider.cluster --provider.wallet --commitment --help [ARGS]... [CARGO_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --run)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --validator)
                    COMPREPLY=($(compgen -W "surfpool legacy" -- "${cur}"))
                    return 0
                    ;;
                --env)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -e)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__upgrade)
            opts="-p -h --program-id --max-retries --provider.cluster --provider.wallet --commitment --help <PROGRAM_FILEPATH> [SOLANA_ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --program-id)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -p)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-retries)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        anchor__verify)
            opts="-h --repo-url --commit-hash --current-dir --program-name --provider.cluster --provider.wallet --commitment --help <PROGRAM_ID> [ARGS]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --repo-url)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commit-hash)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --program-name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.cluster)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --provider.wallet)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --commitment)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    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 _anchor -o nosort -o bashdefault -o default anchor
else
    complete -F _anchor -o bashdefault -o default anchor
fi
