_rebuildctl() {
    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="rebuildctl"
                ;;
            rebuildctl,completions)
                cmd="rebuildctl__completions"
                ;;
            rebuildctl,help)
                cmd="rebuildctl__help"
                ;;
            rebuildctl,pkgs)
                cmd="rebuildctl__pkgs"
                ;;
            rebuildctl,queue)
                cmd="rebuildctl__queue"
                ;;
            rebuildctl,status)
                cmd="rebuildctl__status"
                ;;
            rebuildctl__help,completions)
                cmd="rebuildctl__help__completions"
                ;;
            rebuildctl__help,help)
                cmd="rebuildctl__help__help"
                ;;
            rebuildctl__help,pkgs)
                cmd="rebuildctl__help__pkgs"
                ;;
            rebuildctl__help,queue)
                cmd="rebuildctl__help__queue"
                ;;
            rebuildctl__help,status)
                cmd="rebuildctl__help__status"
                ;;
            rebuildctl__help__pkgs,attestation)
                cmd="rebuildctl__help__pkgs__attestation"
                ;;
            rebuildctl__help__pkgs,diffoscope)
                cmd="rebuildctl__help__pkgs__diffoscope"
                ;;
            rebuildctl__help__pkgs,log)
                cmd="rebuildctl__help__pkgs__log"
                ;;
            rebuildctl__help__pkgs,ls)
                cmd="rebuildctl__help__pkgs__ls"
                ;;
            rebuildctl__help__pkgs,requeue)
                cmd="rebuildctl__help__pkgs__requeue"
                ;;
            rebuildctl__help__pkgs,sync)
                cmd="rebuildctl__help__pkgs__sync"
                ;;
            rebuildctl__help__pkgs,sync-profile)
                cmd="rebuildctl__help__pkgs__sync__profile"
                ;;
            rebuildctl__help__pkgs,sync-stdin)
                cmd="rebuildctl__help__pkgs__sync__stdin"
                ;;
            rebuildctl__help__queue,drop)
                cmd="rebuildctl__help__queue__drop"
                ;;
            rebuildctl__help__queue,ls)
                cmd="rebuildctl__help__queue__ls"
                ;;
            rebuildctl__help__queue,push)
                cmd="rebuildctl__help__queue__push"
                ;;
            rebuildctl__pkgs,attestation)
                cmd="rebuildctl__pkgs__attestation"
                ;;
            rebuildctl__pkgs,diffoscope)
                cmd="rebuildctl__pkgs__diffoscope"
                ;;
            rebuildctl__pkgs,help)
                cmd="rebuildctl__pkgs__help"
                ;;
            rebuildctl__pkgs,log)
                cmd="rebuildctl__pkgs__log"
                ;;
            rebuildctl__pkgs,ls)
                cmd="rebuildctl__pkgs__ls"
                ;;
            rebuildctl__pkgs,requeue)
                cmd="rebuildctl__pkgs__requeue"
                ;;
            rebuildctl__pkgs,sync)
                cmd="rebuildctl__pkgs__sync"
                ;;
            rebuildctl__pkgs,sync-profile)
                cmd="rebuildctl__pkgs__sync__profile"
                ;;
            rebuildctl__pkgs,sync-stdin)
                cmd="rebuildctl__pkgs__sync__stdin"
                ;;
            rebuildctl__pkgs__help,attestation)
                cmd="rebuildctl__pkgs__help__attestation"
                ;;
            rebuildctl__pkgs__help,diffoscope)
                cmd="rebuildctl__pkgs__help__diffoscope"
                ;;
            rebuildctl__pkgs__help,help)
                cmd="rebuildctl__pkgs__help__help"
                ;;
            rebuildctl__pkgs__help,log)
                cmd="rebuildctl__pkgs__help__log"
                ;;
            rebuildctl__pkgs__help,ls)
                cmd="rebuildctl__pkgs__help__ls"
                ;;
            rebuildctl__pkgs__help,requeue)
                cmd="rebuildctl__pkgs__help__requeue"
                ;;
            rebuildctl__pkgs__help,sync)
                cmd="rebuildctl__pkgs__help__sync"
                ;;
            rebuildctl__pkgs__help,sync-profile)
                cmd="rebuildctl__pkgs__help__sync__profile"
                ;;
            rebuildctl__pkgs__help,sync-stdin)
                cmd="rebuildctl__pkgs__help__sync__stdin"
                ;;
            rebuildctl__queue,drop)
                cmd="rebuildctl__queue__drop"
                ;;
            rebuildctl__queue,help)
                cmd="rebuildctl__queue__help"
                ;;
            rebuildctl__queue,ls)
                cmd="rebuildctl__queue__ls"
                ;;
            rebuildctl__queue,push)
                cmd="rebuildctl__queue__push"
                ;;
            rebuildctl__queue__help,drop)
                cmd="rebuildctl__queue__help__drop"
                ;;
            rebuildctl__queue__help,help)
                cmd="rebuildctl__queue__help__help"
                ;;
            rebuildctl__queue__help,ls)
                cmd="rebuildctl__queue__help__ls"
                ;;
            rebuildctl__queue__help,push)
                cmd="rebuildctl__queue__help__push"
                ;;
            *)
                ;;
        esac
    done

    case "${cmd}" in
        rebuildctl)
            opts="-v -H -c -C -h -V --verbose --endpoint --config --color --help --version status pkgs queue completions help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --endpoint)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -H)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --config)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -c)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__completions)
            opts="-v -C -h --verbose --color --help bash elvish fish powershell zsh"
            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
            ;;
        rebuildctl__help)
            opts="status pkgs queue completions 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
            ;;
        rebuildctl__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
            ;;
        rebuildctl__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
            ;;
        rebuildctl__help__pkgs)
            opts="sync ls sync-profile sync-stdin requeue log diffoscope attestation"
            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
            ;;
        rebuildctl__help__pkgs__attestation)
            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
            ;;
        rebuildctl__help__pkgs__diffoscope)
            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
            ;;
        rebuildctl__help__pkgs__log)
            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
            ;;
        rebuildctl__help__pkgs__ls)
            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
            ;;
        rebuildctl__help__pkgs__requeue)
            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
            ;;
        rebuildctl__help__pkgs__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
            ;;
        rebuildctl__help__pkgs__sync__profile)
            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
            ;;
        rebuildctl__help__pkgs__sync__stdin)
            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
            ;;
        rebuildctl__help__queue)
            opts="ls push drop"
            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
            ;;
        rebuildctl__help__queue__drop)
            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
            ;;
        rebuildctl__help__queue__ls)
            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
            ;;
        rebuildctl__help__queue__push)
            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
            ;;
        rebuildctl__help__status)
            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
            ;;
        rebuildctl__pkgs)
            opts="-v -C -h --verbose --color --help sync ls sync-profile sync-stdin requeue log diffoscope attestation 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
            ;;
        rebuildctl__pkgs__attestation)
            opts="-v -C -h --name --status --distro --suite --architecture --verbose --color --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --status)
                    COMPREPLY=($(compgen -W "GOOD BAD UNKWN" -- "${cur}"))
                    return 0
                    ;;
                --distro)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --suite)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__diffoscope)
            opts="-v -C -h --name --status --distro --suite --architecture --verbose --color --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --status)
                    COMPREPLY=($(compgen -W "GOOD BAD UNKWN" -- "${cur}"))
                    return 0
                    ;;
                --distro)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --suite)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__help)
            opts="sync ls sync-profile sync-stdin requeue log diffoscope attestation 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
            ;;
        rebuildctl__pkgs__help__attestation)
            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
            ;;
        rebuildctl__pkgs__help__diffoscope)
            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
            ;;
        rebuildctl__pkgs__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
            ;;
        rebuildctl__pkgs__help__log)
            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
            ;;
        rebuildctl__pkgs__help__ls)
            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
            ;;
        rebuildctl__pkgs__help__requeue)
            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
            ;;
        rebuildctl__pkgs__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
            ;;
        rebuildctl__pkgs__help__sync__profile)
            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
            ;;
        rebuildctl__pkgs__help__sync__stdin)
            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
            ;;
        rebuildctl__pkgs__log)
            opts="-v -C -h --name --status --distro --suite --architecture --verbose --color --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --status)
                    COMPREPLY=($(compgen -W "GOOD BAD UNKWN" -- "${cur}"))
                    return 0
                    ;;
                --distro)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --suite)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__ls)
            opts="-v -C -h --name --status --distro --suite --architecture --json --verbose --color --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --status)
                    COMPREPLY=($(compgen -W "GOOD BAD UNKWN" -- "${cur}"))
                    return 0
                    ;;
                --distro)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --suite)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__requeue)
            opts="-v -C -h --name --status --distro --suite --architecture --priority --reset --verbose --color --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --status)
                    COMPREPLY=($(compgen -W "GOOD BAD UNKWN" -- "${cur}"))
                    return 0
                    ;;
                --distro)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --suite)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__sync)
            opts="-v -C -h --architecture --print-json --maintainer --release --pkg --exclude --sync-method --verbose --color --help <DISTRO> <SUITE> <SOURCE>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --maintainer)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --release)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --pkg)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --exclude)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --sync-method)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__sync__profile)
            opts="-v -C -h --print-json --sync-config --verbose --color --help <PROFILE>"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --sync-config)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__pkgs__sync__stdin)
            opts="-v -C -h --verbose --color --help <DISTRO> <SUITE>"
            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
            ;;
        rebuildctl__queue)
            opts="-v -C -h --verbose --color --help ls push drop 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
            ;;
        rebuildctl__queue__drop)
            opts="-v -C -h --architecture --verbose --color --help <DISTRO> <SUITE> <NAME> [VERSION]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__queue__help)
            opts="ls push drop 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
            ;;
        rebuildctl__queue__help__drop)
            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
            ;;
        rebuildctl__queue__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
            ;;
        rebuildctl__queue__help__ls)
            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
            ;;
        rebuildctl__queue__help__push)
            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
            ;;
        rebuildctl__queue__ls)
            opts="-v -C -h --head --json --verbose --color --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
            ;;
        rebuildctl__queue__push)
            opts="-v -C -h --architecture --priority --verbose --color --help <DISTRO> <SUITE> <NAME> [VERSION]"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --architecture)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        rebuildctl__status)
            opts="-v -C -h --verbose --color --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
            ;;
    esac
}

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