#compdef shelly
# Zsh completions for shelly
# Auto-generated from the native Shelly CLI catalog. Do not edit.

typeset -ga _shelly_repo_packages
typeset -ga _shelly_flatpak_remote_packages

_shelly_packages_standard_sync() {
    if (( ${#_shelly_repo_packages} == 0 )); then
        _shelly_repo_packages=(${(f)"$(pacman -Slq 2>/dev/null)"})
    fi
    _describe -t packages 'package' _shelly_repo_packages
}

_shelly_packages_standard_local() {
    local -a packages
    packages=(${(f)"$(pacman -Qq 2>/dev/null)"})
    _describe -t packages 'package' packages
}

_shelly_packages_aur_local() {
    local -a packages
    packages=(${(f)"$(pacman -Qqm 2>/dev/null)"})
    _describe -t packages 'package' packages
}

_shelly_packages_flatpak_remote() {
    if (( ${#_shelly_flatpak_remote_packages} == 0 )); then
        _shelly_flatpak_remote_packages=(${(f)"$(flatpak remote-ls --app --columns=application 2>/dev/null)"})
    fi
    _describe -t packages 'package' _shelly_flatpak_remote_packages
}

_shelly_packages_flatpak_local() {
    local -a packages
    packages=(${(f)"$(flatpak list --app --columns=application 2>/dev/null)"})
    _describe -t packages 'package' packages
}

_shelly() {
    local action selector
    integer consumed=0
    action=$words[2]
    selector=
    if (( CURRENT == 2 )); then
        local -a actions
        actions=(
            'search:Search ALPM repositories, the AUR, or cached Flatpak AppStream catalogs.'
            'install:Install packages or applications from ALPM repositories, the AUR, AppImages, Flatpak remotes, or local Flatpak files, and repair installed Flatpaks.'
            'upgrade:Upgrade standard, AUR, AppImage, or Flatpak packages, including all supported backends together.'
            'downgrade:Select and install an older version of a standard package.'
            'mark:Manage IgnorePkg and HoldPkg package marks, or change an installed package'\''s explicit/dependency reason.'
            'news:Read Arch Linux news and track viewed entries.'
            'list-updates:List available updates for standard, AUR, AppImage, or Flatpak packages.'
            'list:List installed standard packages, AppImages, AUR packages, or Flatpak applications.'
            'backup:Back up explicitly installed packages as type-grouped TOML.'
            'utility:Repair Shelly directory ownership, manage pacfiles, or generate CLI documentation and shell completions.'
            'purify:Remove corrupted or orphaned ALPM packages, optionally clean the package cache, or remove unused Flatpak dependencies.'
            'remove:Remove standard or local packages, AUR packages, AppImages, or Flatpak applications.'
            'sync:Synchronize ALPM package databases, AppImage metadata, or cached Flatpak AppStream metadata.'
            'update:Update selected standard, AUR, or Flatpak packages.'
            'config:Read and modify Shelly configuration.'
            'keyring:Initialize, inspect, refresh, populate, receive, or locally sign keys in the pacman keyring.'
            'run:Launch or stop a Flatpak or AppImage application.'
            '-Ss:Search ALPM repository and installed packages, or Shelly-managed local binary packages. With a package and no source modifier, show exact package details.'
            '-Sa:Search the AUR RPC, fetch exact package PKGBUILDs, append high-confidence standard repository matches, or show complete metadata for one AUR package.'
            '-Sf:Search cached AppStream catalogs from every configured system and user Flatpak remote, with local pagination and remote-reference sizes and permissions.'
            '-Is:Install ALPM repository packages, local Arch or Shelly binary archives, and package archives downloaded from HTTP(S) URLs.'
            '-Ii:Install a local AppImage into the configured AppImage directory and update Shelly'\''s AppImage metadata database.'
            '-Ia:Fetch, review, build, and install one or more AUR packages, install one package'\''s build dependencies, or install one package at an exact Git commit.'
            '-If:Install a Flatpak application, runtime, .flatpakref file, or bundle, or repair an installed Flatpak while preserving its configuration.'
            '-Us:Synchronize ALPM repositories, show the available repository package upgrades, perform a full system upgrade, and report required restarts.'
            '-Ux:Build and confirm an invoking-user upgrade plan, then upgrade every enabled package backend in one coordinated action, continuing through independent backend failures and returning failure if any selected backend fails.'
            '-Ui:Check every configured AppImage update source and replace each AppImage for which a newer version is available.'
            '-Ua:Find installed foreign packages with newer AUR or VCS revisions, then build and install all available upgrades.'
            '-Uf:Upgrade every application and runtime with an available update in the system and user Flatpak installations.'
            '-Mg:List or modify packages excluded from ALPM upgrades through IgnorePkg.'
            '-Mo:List or modify packages protected from removal through HoldPkg.'
            '-Me:Mark an installed ALPM package as explicitly installed.'
            '-Md:Mark an installed ALPM package as installed as a dependency.'
            '-Px:Query available updates from every supported package backend, continuing through independent backend failures.'
            '-Ps:List available standard repository package updates.'
            '-Pi:List installed AppImages with available updates.'
            '-Pa:List installed AUR packages with available updates.'
            '-Pf:List Flatpak applications and runtimes with available updates.'
            '-Ls:List packages installed in the local ALPM database, with optional IgnorePkg and install-reason filters.'
            '-Li:List installed AppImages.'
            '-LI:List installed AppImages.'
            '-La:List installed foreign packages tracked as AUR packages.'
            '-LA:List installed foreign packages tracked as AUR packages.'
            '-Lf:List installed Flatpaks, configured system and user remotes, or cached AppStream JSON for one or every remote.'
            '-LF:List installed Flatpaks, configured system and user remotes, or cached AppStream JSON for one or every remote.'
            '-Tr:Add, remove, or list pacman.conf ALPM repositories; optionally locally sign a key and refresh databases.'
            '-Zs:Plan corrupted archives, optional orphan cleanup, and optional cache retention cleanup; show the targets, then confirm before changing ALPM or cache state.'
            '-Zf:Plan unused dependency cleanup across system and user Flatpak installations, then show and confirm the targets.'
            '-Rs:Remove installed ALPM packages or Shelly-managed local binaries, with optional dependency and configuration cleanup.'
            '-RS:Remove installed ALPM packages or Shelly-managed local binaries, with optional dependency and configuration cleanup.'
            '-Ri:Remove an installed AppImage and optionally delete its associated configuration.'
            '-RI:Remove an installed AppImage and optionally delete its associated configuration.'
            '-Ra:Remove installed AUR packages and optionally remove dependent or optional packages through ALPM.'
            '-RA:Remove installed AUR packages and optionally remove dependent or optional packages through ALPM.'
            '-Rf:Remove an installed Flatpak application or runtime, with optional unused dependency and configuration cleanup.'
            '-RF:Remove an installed Flatpak application or runtime, with optional unused dependency and configuration cleanup.'
            '-Ys:Synchronize the configured ALPM package databases; use --force to refresh databases even when they appear current.'
            '-Yi:Synchronize extracted AppImage metadata, or configure an installed AppImage'\''s update source with the appimage/url/type overload.'
            '-Yf:Update cached AppStream metadata, or add and remove configured system or user Flatpak remotes.'
            '-Es:Update only the named installed ALPM packages after an explicit partial-upgrade warning and confirmation.'
            '-Ea:Fetch, review, rebuild, and reinstall only the named AUR packages.'
            '-Ef:Update one installed Flatpak application or runtime in its existing user or system installation.'
            '-Cg:Read a Shelly configuration value.'
            '-Cs:Set a Shelly configuration value.'
            '-Cr:Reset Shelly configuration to native defaults.'
            '-Cp:Set Shelly'\''s parallel download count.'
            '-Ki:Initialize the pacman keyring.'
            '-Kl:List keys in the pacman keyring.'
            '-Kr:Refresh pacman keyring keys from the configured keyserver.'
            '-Ks:Locally sign one or more keys in the pacman keyring.'
            '-Kp:Populate the pacman keyring with default or named distribution keys.'
            '-Kv:Receive one or more keys from the configured or requested keyserver.'
            '-Xf:Launch an installed Flatpak application, stop it with --kill, or list running instances with `run flatpak list`.'
            '-Xi:Launch an installed AppImage, or stop it with --kill.'
        )
        _describe 'command' actions
        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 [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--repos[List repositories parsed from pacman.conf and ignore other search modifiers]' '-r[List repositories parsed from pacman.conf and ignore other search modifiers]' '--available[Search packages from the configured ALPM synchronization databases]' '-v[Search packages from the configured ALPM synchronization databases]' '--installed[Search packages from the local ALPM database]' '-i[Search packages from the local ALPM database]' '--local[Search Shelly-managed binary packages installed under /opt/shelly]' '-l[Search Shelly-managed binary packages installed under /opt/shelly]' '--limit[Maximum number of search results to return per page]:limit' '-t[Maximum number of search results to return per page]:limit' '--page[Page number for paginated results]:page' '-p[Page number for paginated results]:page' '--show-hidden[Include packages hidden by pacman IgnorePkg configuration]' '-w[Include packages hidden by pacman IgnorePkg configuration]' '--detail[Show complete metadata for one exact ALPM package name]' '--info[Show complete metadata for one exact ALPM package name]' '-d[Show complete metadata for one exact ALPM package name]' '--group[List package groups or restrict available packages to the requested group]' '-g[List package groups or restrict available packages to the requested group]' '--explicit[Shows only explicitly installed pacakges]' '-e[Shows only explicitly installed pacakges]' '--depends[Shows only dependency packages]' '-D[Shows only dependency packages]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '1::package:_shelly_packages_standard_sync' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--standard[Append high-confidence standard ALPM repository matches to the AUR results]' '-s[Append high-confidence standard ALPM repository matches to the AUR results]' '--pkgbuild[Fetch and display the PKGBUILD for each exact AUR package name]' '-p[Fetch and display the PKGBUILD for each exact AUR package name]' '--detail[Show complete metadata for one exact AUR package name]' '--info[Show complete metadata for one exact AUR package name]' '-d[Show complete metadata for one exact AUR package name]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--limit[Maximum number of search results to return per page]:limit' '-t[Maximum number of search results to return per page]:limit' '--page[Page number for paginated results]:page' '-p[Page number for paginated results]:page' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '1:query:_shelly_packages_flatpak_remote' ;;
            esac
            ;;
        install)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard appimage aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--build-deps[Install build dependencies for the requested packages]' '-b[Install build dependencies for the requested packages]' '--make-deps[Install make dependencies for the requested packages]' '-m[Install make dependencies for the requested packages]' '--no-deps[Pass the ALPM nodeps transaction flag when installing repository packages]' '-d[Pass the ALPM nodeps transaction flag when installing repository packages]' '--upgrade[After confirmation, synchronize and upgrade the standard system before installing the requested repository packages]' '-u[After confirmation, synchronize and upgrade the standard system before installing the requested repository packages]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '*:packages:_shelly_packages_standard_sync' ;;
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--install-path[Directory to install the AppImage into; overrides the configured AppImageInstallPath]:install-path' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '1:location:_files -g "*.AppImage"' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--build-deps[Install build dependencies for the requested packages]' '-b[Install build dependencies for the requested packages]' '--make-deps[Install make dependencies for the requested packages]' '-m[Install make dependencies for the requested packages]' '--chroot[Build packages in a clean chroot with makechrootpkg]' '-c[Build packages in a clean chroot with makechrootpkg]' '--check[Enable the PKGBUILD check() function during package builds]' '--version[Install exactly one AUR package from the following Git commit operand]' '-v[Install exactly one AUR package from the following Git commit operand]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--user[Install into the invoking user'\''s Flatpak installation instead of the system installation]' '--remote[Install from this remote instead of resolving a remote from cached AppStream metadata]:remote' '-r[Install from this remote instead of resolving a remote from cached AppStream metadata]:remote' '--branch[Install this branch; defaults to the branch the remote publishes for the package]:branch' '-b[Install this branch; defaults to the branch the remote publishes for the package]:branch' '--runtime[Build a runtime ref instead of an application ref]' '--ref-file[Treat the package operand as a local .flatpakref file]' '-e[Treat the package operand as a local .flatpakref file]' '--bundle[Treat the package operand as a local Flatpak bundle]' '-u[Treat the package operand as a local Flatpak bundle]' '--repair[Reinstall the installed Flatpak and its dependencies while preserving application configuration]' '-f[Reinstall the installed Flatpak and its dependencies while preserving application configuration]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '1:package:_shelly_packages_flatpak_remote' ;;
            esac
            ;;
        upgrade)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard all appimage aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--all[Upgrade standard, AUR, Flatpak, and AppImage backends]' '-a[Upgrade standard, AUR, Flatpak, and AppImage backends]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                all) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--no-repo[Skip the standard ALPM backend]' '--no-aur[Skip the AUR backend]' '--no-flatpak[Skip the Flatpak backend]' '--no-appimage[Skip the AppImage backend]' '--no-devel[Skip -git aur]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--check[Run each PKGBUILD check() function during AUR upgrade builds]' '--singlepane[Use the shared pacman-style linear output (already the native Zig non-UI output mode)]' '--no-devel[Skip checking -git packages]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        downgrade)
            (( consumed == 0 )) && consumed=1; (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--oldest[Select the oldest available version instead of prompting or selecting the newest version]' '-o[Select the oldest available version instead of prompting or selecting the newest version]' '--ignore[Add the package to IgnorePkg after a successful downgrade]' '-i[Add the package to IgnorePkg after a successful downgrade]' '--list-options[List cached and archived versions without installing one]' '-l[List cached and archived versions without installing one]' '--target[Install an exact version-release or package filename]:target' '-t[Install an exact version-release or package filename]:target' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]'
            ;;
        mark)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(ignore hold explicit dependency)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                ignore) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--list[List packages in IgnorePkg]' '-l[List packages in IgnorePkg]' '--add[Add packages to IgnorePkg]' '-a[Add packages to IgnorePkg]' '--remove[Remove packages from IgnorePkg]' '-r[Remove packages from IgnorePkg]' '--clear[Clear IgnorePkg]' '-c[Clear IgnorePkg]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                hold) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--list[List packages in HoldPkg]' '-l[List packages in HoldPkg]' '--add[Add packages to HoldPkg]' '-a[Add packages to HoldPkg]' '--remove[Remove packages from HoldPkg]' '-r[Remove packages from HoldPkg]' '--clear[Clear HoldPkg except for Shelly'\''s protected entry]' '-c[Clear HoldPkg except for Shelly'\''s protected entry]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                explicit) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                dependency) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        news)
            (( consumed == 0 )) && consumed=1; (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--all[Show previously viewed news as well as unread entries]' '-a[Show previously viewed news as well as unread entries]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]'
            ;;
        list-updates)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(all standard appimage aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                all) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--show-hidden[Include hidden packages]' '--no-devel[Does not check for -git builds]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--show-hidden[Include hidden packages]' '--no-devel[Does not check for -git builds]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        list)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard appimage aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--show-hidden[Include hidden packages]' '-w[Include hidden packages]' '--explicitOnly[List explicitly installed packages only]' '-e[List explicitly installed packages only]' '--dependencyOnly[List dependency-installed packages only]' '-d[List dependency-installed packages only]' '--required-by[Include packages that directly require each listed package]' '--optional-for[Include packages that directly use each listed package optionally]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--show-hidden[Include hidden packages]' '--explicitOnly[List explicitly installed packages only]' '-e[List explicitly installed packages only]' '--dependencyOnly[List dependency-installed packages only]' '-d[List dependency-installed packages only]' '--required-by[Include packages that directly require each listed package]' '--optional-for[Include packages that directly use each listed package optionally]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        backup)
            (( consumed == 0 )) && consumed=1; (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--export[Exports a declaritive list of explicitly installed standard packages, AUR packages, and Flatpak applications]' '-e[Exports a declaritive list of explicitly installed standard packages, AUR packages, and Flatpak applications]' '--import[Imports a previously exported backup and installs the latest versions of all items listed]' '-i[Imports a previously exported backup and installs the latest versions of all items listed]' '--name[File name without the .toml extension]:name' '-a[File name without the .toml extension]:name' '--directory[Directory in which to write/read the backup]:directory' '-d[Directory in which to write/read the backup]:directory' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]'
            ;;
        utility)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=( 'repository' )
                    _alternative 'commands:command:commands' 'options:option:(--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)'
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                repository) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--add[Add the named repository (requires name and url)]' '-a[Add the named repository (requires name and url)]' '--remove[Remove the named repository]' '-x[Remove the named repository]' '--list[List configured repositories]' '-l[List configured repositories]' '--no-sync[Skip the final database refresh]' '-n[Skip the final database refresh]' '--lsign-key[Key to locally sign with pacman-key before adding]:lsign-key' '-s[Key to locally sign with pacman-key before adding]:lsign-key' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                *) [[ $selector != utility ]] && consumed=1; (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--fix-permissions[Restore the invoking user'\''s ownership of Shelly'\''s configuration, cache, and data directories]' '-f[Restore the invoking user'\''s ownership of Shelly'\''s configuration, cache, and data directories]' '--repair-db[Remove a stale database lock]' '-r[Remove a stale database lock]' '--docs[Write Markdown CLI reference documentation to standard output]' '-d[Write Markdown CLI reference documentation to standard output]' '--completions[Write a Bash, Fish, or Zsh completion script to standard output]:completions:(bash fish zsh)' '-c[Write a Bash, Fish, or Zsh completion script to standard output]:completions:(bash fish zsh)' '--pacfiles[Run the pacdiff-compatible pacnew, pacorig, and pacsave maintenance workflow]' '-p[Run the pacdiff-compatible pacnew, pacorig, and pacsave maintenance workflow]' '--find[Recursively find pacfiles instead of reading the pacman database]' '-F[Recursively find pacfiles instead of reading the pacman database]' '--locate[Find pacfiles with locate instead of reading the pacman database]' '-l[Find pacfiles with locate instead of reading the pacman database]' '--pacmandb[Search backup paths from the local pacman database (default)]' '-P[Search backup paths from the local pacman database (default)]' '--backup[Save the old original as .bak before overwriting]' '-b[Save the old original as .bak before overwriting]' '--cachedir[Package cache directory for three-way base archives; repeat to add directories]:cachedir' '-C[Package cache directory for three-way base archives; repeat to add directories]:cachedir' '--output[Print discovered pacfile paths without modifying them]' '-o[Print discovered pacfile paths without modifying them]' '--sudo[Explicitly request elevation; interactive pacfile maintenance elevates automatically]' '-s[Explicitly request elevation; interactive pacfile maintenance elevates automatically]' '--threeway[Use a cached older package as the third input when viewing differences]' '-3[Use a cached older package as the third input when viewing differences]' '--nocolor[Disable colored pacfile status output]' '--search-path[Path to scan with --find; repeat to add paths]:search-path' '--diff-program[Diff command, overriding DIFFPROG]:diff-program' '--merge-program[Merge command, overriding MERGEPROG]:merge-program' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        purify)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--dry-run[Show the cleanup plan without changing packages]' '-d[Show the cleanup plan without changing packages]' '--orphans[Include orphaned packages]' '-o[Include orphaned packages]' '--cache[Remove older cached package versions while retaining this many versions]:cache' '-c[Remove older cached package versions while retaining this many versions]:cache' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        remove)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard appimage aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--cascade[Remove dependencies that are no longer needed]' '-c[Remove dependencies that are no longer needed]' '--no-cascade[Keep dependencies that become unneeded after removal]' '--opt-deps[Remove unused optional dependencies installed with the packages]' '-o[Remove unused optional dependencies installed with the packages]' '--ripple[Remove packages that depend on the removed packages]' '-i[Remove packages that depend on the removed packages]' '--remove-config[Remove configuration associated with the removed package]' '--local[Remove Shelly-managed local binaries]' '-l[Remove Shelly-managed local binaries]' '--force[Force local binary removal]' '-f[Force local binary removal]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '*:packages:_shelly_packages_standard_local' ;;
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--remove-config[Remove configuration associated with the removed package]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--cascade[Remove dependencies that are no longer needed]' '-c[Remove dependencies that are no longer needed]' '--opt-deps[Remove unused optional dependencies installed with the packages]' '-o[Remove unused optional dependencies installed with the packages]' '--ripple[Remove packages that depend on the removed packages]' '-i[Remove packages that depend on the removed packages]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '*:packages:_shelly_packages_aur_local' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--remove-unused[Remove newly unused Flatpak dependencies]' '-r[Remove newly unused Flatpak dependencies]' '--remove-config[Remove configuration associated with the removed package]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' '1:package:_shelly_packages_flatpak_local' ;;
            esac
            ;;
        sync)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=( 'appimage' 'flatpak' )
                    _alternative 'commands:command:commands' 'options:option:(--force -f --help -? -h /? /h --no-confirm -n --ui-mode -U --json -j)'
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--prerelease[Allow prerelease versions for the configured update source]' '-p[Allow prerelease versions for the configured update source]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--remote-url[Remote URL or .flatpakrepo URL; required for remote add]:remote-url' '-u[Remote URL or .flatpakrepo URL; required for remote add]:remote-url' '--system[Use system scope; defaults to true]' '-s[Use system scope; defaults to true]' '--gpg-verify[Enable GPG verification when adding; defaults to true]' '-g[Enable GPG verification when adding; defaults to true]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                *) [[ $selector != standard ]] && consumed=1; (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--force[Force every configured ALPM package database to refresh]' '-f[Force every configured ALPM package database to refresh]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        update)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(standard aur flatpak)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                standard) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                aur) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--check[Run each PKGBUILD check() function during the rebuild]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        config)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=( 'get' 'set' 'reset' 'parallel' )
                    _alternative 'commands:command:commands' 'options:option:(--help -? -h /? /h --no-confirm -n --ui-mode -U --json -j)'
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                get) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                set) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                reset) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                parallel) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                *) [[ $selector != list ]] && consumed=1; (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        keyring)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(init list refresh lsign populate recv)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                init) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                list) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                refresh) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                lsign) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                populate) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                recv) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--keyserver[Keyserver from which to receive keys]:keyserver' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
        run)
            if [[ -z $selector ]]; then
                if (( CURRENT == 3 )); then
                    local -a commands
                    commands=(flatpak appimage)
                    _describe 'command' commands
                    return
                fi
                selector=$words[3]
                consumed=2
            fi
            case $selector in
                flatpak) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--kill[Stop the selected application instead of launching it]' '-k[Stop the selected application instead of launching it]' '--list[List running Flatpak applications and process identifiers]' '-l[List running Flatpak applications and process identifiers]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
                appimage) (( consumed > 0 )) && { words=("$words[1]" "${(@)words[consumed+2,$#words]}"); (( CURRENT -= consumed )); }; _arguments '--kill[Stop the selected application instead of launching it]' '-k[Stop the selected application instead of launching it]' '--help[Show command-specific help and usage information]' '-h[Show command-specific help and usage information]' '--no-confirm[Use safe automatic answers instead of prompting]' '-n[Use safe automatic answers instead of prompting]' '--ui-mode[Emit framed output for the Shelly UI]' '-U[Emit framed output for the Shelly UI]' '--json[Output structured JSON where the command supports it]' '-j[Output structured JSON where the command supports it]' ;;
            esac
            ;;
    esac
}
_shelly "$@"
