# 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 --help -? -h /? /h --version -V --no-confirm -n --ui-mode -U --json -j -Ss -Sa -Sf -Is -Ii -Ia -If -Us -Ux -Ui -Ua -Uf -Mg -Mo -Me -Md -Px -Ps -Pi -Pa -Pf -Ls -Li -LI -La -LA -Lf -LF -Tr -Zs -Zf -Rs -RS -Ri -RI -Ra -RA -Rf -RF -Ys -Yi -Yf -Es -Ea -Ef -Cg -Cs -Cr -Cp -Ki -Kl -Kr -Ks -Kp -Kv -Xf -Xi' -- "$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 ;;
    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' -- "$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' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--limit -t --page -p --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$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' -- "$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 --version -v --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$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' -- "$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' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--check --singlepane --no-devel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$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' -- "$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' -- "$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' -- "$cur") )
                    fi
                    ;;
                explicit)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                dependency)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$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' -- "$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' -- "$cur") )
                    fi
                    ;;
                standard)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--show-hidden --no-devel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$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' -- "$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' -- "$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' -- "$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' -- "$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 --cache -c --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$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' -- "$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' -- "$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' -- "$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' -- "$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' -- "$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' -- "$cur") )
                    fi
                    ;;
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--force -f --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$cur") )
                    fi
                    ;;
                aur)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--check --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                flatpak)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
        config)
            if (( COMP_CWORD == 2 && consumed == 0 )); then
                COMPREPLY=( $(compgen -W 'get set reset parallel --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                return
            fi
            case "$selector" in
                get)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                set)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                reset)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                parallel)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                *)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$cur") )
                    fi
                    ;;
                list)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                refresh)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                lsign)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                populate)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
                recv)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--keyserver --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$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' -- "$cur") )
                    fi
                    ;;
                appimage)
                    if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $(compgen -W '--kill -k --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j' -- "$cur") )
                    fi
                    ;;
            esac
            ;;
    esac
}
complete -F _shelly shelly
