# Bash completions for shelly
# Auto-generated from the native Shelly CLI catalog. Do not edit.
_shelly_packages_standard_sync() {
    pacman -Slq 2>/dev/null
}

_shelly_packages_standard_local() {
    pacman -Qq 2>/dev/null
}

_shelly_packages_aur_local() {
    pacman -Qqm 2>/dev/null
}

_shelly_packages_flatpak_remote() {
    flatpak remote-ls --app --columns=application 2>/dev/null
}

_shelly_packages_flatpak_local() {
    flatpak list --app --columns=application 2>/dev/null
}

_shelly() {
    local cur prev action selector consumed
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    action="${COMP_WORDS[1]}"
    selector="${COMP_WORDS[2]}"
    consumed=0

    if (( COMP_CWORD == 1 )); then
        COMPREPLY=( $(compgen -W 'search install upgrade downgrade mark news list-updates list backup utility purify remove sync update config keyring run build resolve --help -? -h /? /h --version -V --no-confirm -n --ui-mode -U --json -j --aur-url -Ss -Ssr -Ssv -Ssi -Ssl -Sst -Ssp -Ssw -Ssd -Ssg -Sse -SsD -Sa -Sap -Sad -Sf -Sft -Sfp -Is -Isb -Ism -Isd -Isu -Ii -Ia -Iab -Iam -Iac -Iav -If -Ifr -Ifb -Ife -Ifu -Iff -Us -Usa -Ux -Ui -Ua -Uf -Mg -Mgl -Mga -Mgr -Mgc -Mo -Mol -Moa -Mor -Moc -Me -Md -Px -Ps -Pi -Pa -Pf -Ls -Lsw -Lse -Lsd -Li -LI -La -Lae -Lad -LA -LAe -LAd -Lf -LF -Tr -Tra -Trx -Trl -Trn -Trs -Zs -Zsd -Zso -Zsc -Zf -Rs -Rsc -Rso -Rsi -Rsl -Rsf -RS -RSc -RSo -RSi -RSl -RSf -Ri -RI -Ra -Rac -Rao -Rai -RA -RAc -RAo -RAi -Rf -Rfr -RF -RFr -Ys -Ysf -Yi -Yip -Yf -Yfu -Yfs -Yfg -Es -Ea -Ef -Cg -Cs -Cr -Cp -Ki -Kl -Kr -Ks -Kp -Kv -Xf -Xfk -Xfl -Xi -Xik -D -Do -Di -Dl -Dt -N -Na -P -B -Be -Bi -Ba -Bd -T -Tf -Td -Tc -Tp -TF -Tl -TP -Tb -TC -To -Ts -T3 -C -A -Ar -As -Ac -Ai -Q' -- "$cur") )
        return
    fi

    case "$action" in
        -Ss*) action="search"; selector="standard"; consumed=1 ;;
        -Sa*) action="search"; selector="aur"; consumed=1 ;;
        -Sf*) action="search"; selector="flatpak"; consumed=1 ;;
        -Is*) action="install"; selector="standard"; consumed=1 ;;
        -Ii*) action="install"; selector="appimage"; consumed=1 ;;
        -Ia*) action="install"; selector="aur"; consumed=1 ;;
        -If*) action="install"; selector="flatpak"; consumed=1 ;;
        -Us*) action="upgrade"; selector="standard"; consumed=1 ;;
        -Ux*) action="upgrade"; selector="all"; consumed=1 ;;
        -Ui*) action="upgrade"; selector="appimage"; consumed=1 ;;
        -Ua*) action="upgrade"; selector="aur"; consumed=1 ;;
        -Uf*) action="upgrade"; selector="flatpak"; consumed=1 ;;
        -Mg*) action="mark"; selector="ignore"; consumed=1 ;;
        -Mo*) action="mark"; selector="hold"; consumed=1 ;;
        -Me*) action="mark"; selector="explicit"; consumed=1 ;;
        -Md*) action="mark"; selector="dependency"; consumed=1 ;;
        -Px*) action="list-updates"; selector="all"; consumed=1 ;;
        -Ps*) action="list-updates"; selector="standard"; consumed=1 ;;
        -Pi*) action="list-updates"; selector="appimage"; consumed=1 ;;
        -Pa*) action="list-updates"; selector="aur"; consumed=1 ;;
        -Pf*) action="list-updates"; selector="flatpak"; consumed=1 ;;
        -Ls*) action="list"; selector="standard"; consumed=1 ;;
        -Li*) action="list"; selector="appimage"; consumed=1 ;;
        -LI*) action="list"; selector="appimage"; consumed=1 ;;
        -La*) action="list"; selector="aur"; consumed=1 ;;
        -LA*) action="list"; selector="aur"; consumed=1 ;;
        -Lf*) action="list"; selector="flatpak"; consumed=1 ;;
        -LF*) action="list"; selector="flatpak"; consumed=1 ;;
        -Tr*) action="utility"; selector="repository"; consumed=1 ;;
        -Zs*) action="purify"; selector="standard"; consumed=1 ;;
        -Zf*) action="purify"; selector="flatpak"; consumed=1 ;;
        -Rs*) action="remove"; selector="standard"; consumed=1 ;;
        -RS*) action="remove"; selector="standard"; consumed=1 ;;
        -Ri*) action="remove"; selector="appimage"; consumed=1 ;;
        -RI*) action="remove"; selector="appimage"; consumed=1 ;;
        -Ra*) action="remove"; selector="aur"; consumed=1 ;;
        -RA*) action="remove"; selector="aur"; consumed=1 ;;
        -Rf*) action="remove"; selector="flatpak"; consumed=1 ;;
        -RF*) action="remove"; selector="flatpak"; consumed=1 ;;
        -Ys*) action="sync"; selector="standard"; consumed=1 ;;
        -Yi*) action="sync"; selector="appimage"; consumed=1 ;;
        -Yf*) action="sync"; selector="flatpak"; consumed=1 ;;
        -Es*) action="update"; selector="standard"; consumed=1 ;;
        -Ea*) action="update"; selector="aur"; consumed=1 ;;
        -Ef*) action="update"; selector="flatpak"; consumed=1 ;;
        -Cg*) action="config"; selector="get"; consumed=1 ;;
        -Cs*) action="config"; selector="set"; consumed=1 ;;
        -Cr*) action="config"; selector="reset"; consumed=1 ;;
        -Cp*) action="config"; selector="parallel"; consumed=1 ;;
        -Ki*) action="keyring"; selector="init"; consumed=1 ;;
        -Kl*) action="keyring"; selector="list"; consumed=1 ;;
        -Kr*) action="keyring"; selector="refresh"; consumed=1 ;;
        -Ks*) action="keyring"; selector="lsign"; consumed=1 ;;
        -Kp*) action="keyring"; selector="populate"; consumed=1 ;;
        -Kv*) action="keyring"; selector="recv"; consumed=1 ;;
        -Xf*) action="run"; selector="flatpak"; consumed=1 ;;
        -Xi*) action="run"; selector="appimage"; consumed=1 ;;
        -U*) action="upgrade"; selector="all"; consumed=1 ;;
        -D*) action="downgrade"; selector="standard"; consumed=1 ;;
        -N*) action="news"; selector="standard"; consumed=1 ;;
        -P*) action="list-updates"; selector="all"; consumed=1 ;;
        -B*) action="backup"; selector="utility"; consumed=1 ;;
        -T*) action="utility"; selector="utility"; consumed=1 ;;
        -C*) action="config"; selector="list"; consumed=1 ;;
        -A*) action="build"; selector="build"; consumed=1 ;;
        -Q*) action="resolve"; selector="resolve"; consumed=1 ;;
    esac

    case "$action" in
        search)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--repos -r --available -v --installed -i --local -l --limit -t --page -p --show-hidden -w --detail --info -d --group -g --explicit -e --depends -D --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_standard_sync)" -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--standard -s --pkgbuild -p --detail --info -d --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--limit -t --page -p --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_flatpak_remote)" -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        install)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard appimage aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--build-deps -b --make-deps -m --no-deps -d --upgrade -u --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_standard_sync)" -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--install-path --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -f -X '!*.AppImage' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--build-deps -b --make-deps -m --chroot -c --check --no-check --sign --nosign --version -v --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--user --remote -r --branch -b --runtime --ref-file -e --bundle -u --repair -f --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_flatpak_remote)" -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        upgrade)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard all appimage aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--all -a --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                all)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--no-repo --no-aur --no-flatpak --no-appimage --no-devel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--check --no-check --sign --nosign --singlepane --no-devel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        downgrade)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W '--oldest -o --ignore -i --list-options -l --target -t --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--oldest -o --ignore -i --list-options -l --target -t --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        mark)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'ignore hold explicit dependency' -- "$cur") )
                return
            fi
            case "$selector" in
                ignore)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--list -l --add -a --remove -r --clear -c --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                hold)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--list -l --add -a --remove -r --clear -c --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                explicit)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                dependency)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        news)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W '--all -a --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--all -a --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        list-updates)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'all standard appimage aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                all)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--show-hidden --no-devel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--show-hidden --no-devel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        list)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard appimage aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--show-hidden -w --explicitOnly -e --dependencyOnly -d --required-by --optional-for --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--show-hidden --explicitOnly -e --dependencyOnly -d --required-by --optional-for --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        backup)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W '--export -e --import -i --name -a --directory -d --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--export -e --import -i --name -a --directory -d --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        utility)
            case "$prev" in
                --completions|-c) COMPREPLY=( $(compgen -W 'bash fish zsh' -- "$cur") ); return ;;
            esac
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'repository --fix-permissions -f --repair-db -r --docs -d --completions -c --pacfiles -p --find -F --locate -l --pacmandb -P --backup -b --cachedir -C --output -o --sudo -s --threeway -3 --nocolor --search-path --diff-program --merge-program --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                repository)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--add -a --remove -x --list -l --no-sync -n --lsign-key -s --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--fix-permissions -f --repair-db -r --docs -d --completions -c --pacfiles -p --find -F --locate -l --pacmandb -P --backup -b --cachedir -C --output -o --sudo -s --threeway -3 --nocolor --search-path --diff-program --merge-program --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        purify)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--dry-run -d --orphans -o --aur-cache --cache -c --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        remove)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard appimage aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--cascade -c --no-cascade --opt-deps -o --ripple -i --remove-config --local -l --force -f --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_standard_local)" -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--remove-config --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--cascade -c --opt-deps -o --ripple -i --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_aur_local)" -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--remove-unused -r --remove-config --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    else
                        COMPREPLY=( $(compgen -W "$(_shelly_packages_flatpak_local)" -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        sync)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'appimage flatpak --force -f --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--prerelease -p --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--remote-url -u --system -s --gpg-verify -g --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--force -f --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        update)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'standard aur flatpak' -- "$cur") )
                return
            fi
            case "$selector" in
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--check --no-check --sign --nosign --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        config)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'appimage get set reset parallel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--set-env --unset-env --clear-env --replace-env --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                get)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                set)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                reset)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                parallel)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        keyring)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'init list refresh lsign populate recv' -- "$cur") )
                return
            fi
            case "$selector" in
                init)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                list)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                refresh)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                lsign)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                populate)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                recv)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--keyserver --user --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        run)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'flatpak appimage' -- "$cur") )
                return
            fi
            case "$selector" in
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--kill -k --list -l --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--kill -k --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        build)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W '--reviewed -r --review-only --review-digest --package-destination --makesrcinfo --sync-deps -s --check -c --no-check --sign --nosign --key --noverify --isolated -i --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--reviewed -r --review-only --review-digest --package-destination --makesrcinfo --sync-deps -s --check -c --no-check --sign --nosign --key --noverify --isolated -i --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        resolve)
            case "$prev" in
                --source) COMPREPLY=( $(compgen -W 'auto standard aur' -- "$cur") ); return ;;
            esac
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W '--source --repository --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                return
            fi
            case "$selector" in
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--source --repository --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j --aur-url' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
    esac
}
complete -F _shelly shelly
