#compdef rattler

autoload -U is-at-least

_rattler() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_rattler_commands" \
"*::: :->rattler-bin" \
&& ret=0
    case $state in
    (rattler-bin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-command-$line[1]:"
        case $line[1] in
            (auth)
_arguments "${_arguments_options[@]}" : \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_rattler__subcmd__auth_commands" \
"*::: :->auth" \
&& ret=0

    case $state in
    (auth)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-auth-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
'--token=[The token to use (for authentication with prefix.dev)]:TOKEN:_default' \
'--username=[The username to use (for basic HTTP authentication)]:USERNAME:_default' \
'--password=[The password to use (for basic HTTP authentication)]:PASSWORD:_default' \
'--conda-token=[The token to use on anaconda.org / quetz authentication]:CONDA_TOKEN:_default' \
'(--token --username --password --conda-token)--s3-access-key-id=[The S3 access key ID]:S3_ACCESS_KEY_ID:_default' \
'--s3-secret-access-key=[The S3 secret access key]:S3_SECRET_ACCESS_KEY:_default' \
'--s3-session-token=[The S3 session token]:S3_SESSION_TOKEN:_default' \
'--oauth-issuer-url=[OIDC issuer URL (defaults to <https\://{host>})]:OAUTH_ISSUER_URL:_default' \
'--oauth-client-id=[OAuth client ID (defaults to "rattler")]:OAUTH_CLIENT_ID:_default' \
'--oauth-client-secret=[OAuth client secret (for confidential clients)]:OAUTH_CLIENT_SECRET:_default' \
'--oauth-flow=[OAuth flow\: auto (default), auth-code, device-code]:OAUTH_FLOW:(auto auth-code device-code)' \
'*--oauth-scope=[Additional OAuth scopes to request (repeatable)]:OAUTH_SCOPES:_default' \
'--oauth-redirect-uri=[OAuth redirect URI (defaults to a random localhost port). Set this when the OAuth client on the \`IdP\` side is registered with a specific redirect URI such as \`http\://127.0.0.1\:8000/auth/oidc\`]:OAUTH_REDIRECT_URI:_default' \
'--user-agent=[User-Agent header used for requests]:USER_AGENT:_default' \
'(--token --username --password --conda-token --s3-access-key-id)--oauth[Use OAuth/OIDC authentication]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':host -- The host to authenticate with (e.g. prefix.dev):_default' \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':host -- The host to remove authentication for:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rattler__subcmd__auth__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-auth-help-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(completion)
_arguments "${_arguments_options[@]}" : \
'-s+[The shell to generate a completion script for]:SHELL:((bash\:"Bash shell"
elvish\:"Elvish shell"
fish\:"Fish shell"
nushell\:"Nushell"
powershell\:"\`PowerShell\` shell"
zsh\:"Zsh shell"))' \
'--shell=[The shell to generate a completion script for]:SHELL:((bash\:"Bash shell"
elvish\:"Elvish shell"
fish\:"Fish shell"
nushell\:"Nushell"
powershell\:"\`PowerShell\` shell"
zsh\:"Zsh shell"))' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" : \
'*-c+[Channel to search for packages]:CHANNELS:_default' \
'*--channel=[Channel to search for packages]:CHANNELS:_default' \
'--platform=[Target platform (e.g., linux-64, osx-arm64)]:PLATFORM:_default' \
'*--virtual-package=[]:VIRTUAL_PACKAGE:_default' \
'--solver=[SAT Solver backend to use]:SOLVER:(resolvo libsolv)' \
'--timeout=[Request solver timeout in milliseconds]:TIMEOUT:_default' \
'-p+[Target prefix (environment path) for package installation]:TARGET_PREFIX:_files' \
'--prefix=[Target prefix (environment path) for package installation]:TARGET_PREFIX:_files' \
'--target-prefix=[Target prefix (environment path) for package installation]:TARGET_PREFIX:_files' \
'--strategy=[]:STRATEGY:((highest\:"Resolve the highest compatible version for every package"
lowest\:"Resolve the lowest compatible version for every package"
lowest-direct\:"Resolve the lowest compatible version for direct dependencies but the highest compatible for transitive dependencies"))' \
'--exclude-newer=[Exclude packages that have been published after the specified timestamp. Can be specified as a timestamp (e.g., "2006-12-02T02\:07\:43Z") or as a date (e.g., "2006-12-02"). When using a date, packages from the entire day are included]:EXCLUDE_NEWER:_default' \
'--dry-run[Simulute command without installation]' \
'--only-deps[Only install dependencies of package specs]' \
'--no-deps[Only install package specifications without dependencies]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::specs -- Package specs to install:_default' \
&& ret=0
;;
(download)
_arguments "${_arguments_options[@]}" : \
'-o+[Output path for the downloaded file, or '\''-'\'' to write to stdout]:OUTPUT:_files' \
'--output=[Output path for the downloaded file, or '\''-'\'' to write to stdout]:OUTPUT:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':url -- URL of the file to download:_default' \
&& ret=0
;;
(fetch-file)
_arguments "${_arguments_options[@]}" : \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':url -- URL of the conda package (.conda or .tar.bz2 archive):_default' \
':path -- Path of the file inside the package (e.g. "info/index.json" or "lib/libfoo.so"):_default' \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':url -- URL of the conda package to inspect (must be a .conda archive):_default' \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
'*-c+[Channels to search in]:CHANNELS:_default' \
'*--channels=[Channels to search in]:CHANNELS:_default' \
'-p+[Platform to search for]:PLATFORM:_default' \
'--platform=[Platform to search for]:PLATFORM:_default' \
'--limit-packages=[Maximum number of packages to display]:LIMIT_PACKAGES:_default' \
'--limit=[Maximum number of versions to display per package]:LIMIT:_default' \
'--sharded=[Enable sharded repodata]:SHARDED:(true false)' \
'--all[Show all packages and versions (no limits)]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':matchspec -- The matchspec pattern to search for:_default' \
&& ret=0
;;
(shell-hook)
_arguments "${_arguments_options[@]}" : \
'-p+[Target prefix to generate the shell hook for]:TARGET_PREFIX:_files' \
'--prefix=[Target prefix to generate the shell hook for]:TARGET_PREFIX:_files' \
'--target-prefix=[Target prefix to generate the shell hook for]:TARGET_PREFIX:_files' \
'-s+[Shell to generate the hook for (bash, zsh, fish, xonsh, cmd, nushell, powershell)]:SHELL:_default' \
'--shell=[Shell to generate the hook for (bash, zsh, fish, xonsh, cmd, nushell, powershell)]:SHELL:_default' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(virtual-packages)
_arguments "${_arguments_options[@]}" : \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(install-menu)
_arguments "${_arguments_options[@]}" : \
'-t+[Target prefix to look for the package (defaults to \`.prefix\`)]:TARGET_PREFIX:_files' \
'--target-prefix=[Target prefix to look for the package (defaults to \`.prefix\`)]:TARGET_PREFIX:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':package_name -- Name of the package for which to install menu items:_default' \
&& ret=0
;;
(remove-menu)
_arguments "${_arguments_options[@]}" : \
'-t+[Target prefix to look for the package (defaults to \`.prefix\`)]:TARGET_PREFIX:_files' \
'--target-prefix=[Target prefix to look for the package (defaults to \`.prefix\`)]:TARGET_PREFIX:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':package_name -- Name of the package for which to remove menu items:_default' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'-p+[Target prefix (environment path) for package installation]:TARGET_PREFIX:_files' \
'--prefix=[Target prefix (environment path) for package installation]:TARGET_PREFIX:_files' \
'--target-prefix=[Target prefix (environment path) for package installation]:TARGET_PREFIX:_files' \
'--cwd=[Working directory for the child process]:CWD:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::command -- Program and arguments to run:_default' \
&& ret=0
;;
(extract)
_arguments "${_arguments_options[@]}" : \
'-d+[Destination directory where the package will be extracted If not specified, extracts to a directory with the same name as the package]:DESTINATION:_files' \
'--destination=[Destination directory where the package will be extracted If not specified, extracts to a directory with the same name as the package]:DESTINATION:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':package -- Path or URL to the conda package archive (.tar.bz2 or .conda):_default' \
&& ret=0
;;
(link)
_arguments "${_arguments_options[@]}" : \
'-d+[Destination directory where the package will be linked into]:DESTINATION:_files' \
'--destination=[Destination directory where the package will be linked into]:DESTINATION:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
':package_dir -- The package directory to link from:_files' \
&& ret=0
;;
(upload)
_arguments "${_arguments_options[@]}" : \
'*--allow-insecure-host=[List of hosts for which SSL certificate verification should be skipped]:ALLOW_INSECURE_HOST:_default' \
'--auth-file=[Path to an auth-file to read authentication information from]:AUTH_FILE:_files' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'::package_files -- The package file to upload:_files' \
":: :_rattler__subcmd__upload_commands" \
"*::: :->upload" \
&& ret=0

    case $state in
    (upload)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-upload-command-$line[2]:"
        case $line[2] in
            (quetz)
_arguments "${_arguments_options[@]}" : \
'-u+[The URL to your Quetz server]:URL:_default' \
'--url=[The URL to your Quetz server]:URL:_default' \
'-c+[The URL to your channel]:CHANNELS:_default' \
'--channel=[The URL to your channel]:CHANNELS:_default' \
'-a+[The Quetz API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'--api-key=[The Quetz API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(artifactory)
_arguments "${_arguments_options[@]}" : \
'-u+[The URL to your Artifactory server]:URL:_default' \
'--url=[The URL to your Artifactory server]:URL:_default' \
'-c+[The URL to your channel]:CHANNELS:_default' \
'--channel=[The URL to your channel]:CHANNELS:_default' \
'--username=[Your Artifactory username]:USERNAME:_default' \
'--password=[Your Artifactory password]:PASSWORD:_default' \
'-t+[Your Artifactory token]:TOKEN:_default' \
'--token=[Your Artifactory token]:TOKEN:_default' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(prefix)
_arguments "${_arguments_options[@]}" : \
'-u+[The URL to the prefix.dev server (only necessary for self-hosted instances)]:URL:_default' \
'--url=[The URL to the prefix.dev server (only necessary for self-hosted instances)]:URL:_default' \
'-c+[The channel to upload the package to]:CHANNEL:_default' \
'--channel=[The channel to upload the package to]:CHANNEL:_default' \
'-a+[The prefix.dev API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'--api-key=[The prefix.dev API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'(--generate-attestation)--attestation=[Upload an attestation file alongside the package. Note\: if you add an attestation, you can _only_ upload a single package. Mutually exclusive with --generate-attestation]:ATTESTATION:_files' \
'(--attestation)--generate-attestation[Automatically generate attestation using cosign in CI. Mutually exclusive with --attestation]' \
'--store-github-attestation[Also store the generated attestation to GitHub'\''s attestation API. Requires \`GITHUB_TOKEN\` environment variable and only works in GitHub Actions. The attestation will be associated with the current repository]' \
'-s[Skip upload if package already exists]' \
'--skip-existing[Skip upload if package already exists]' \
'--force[Force overwrite existing packages]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(anaconda)
_arguments "${_arguments_options[@]}" : \
'-o+[The owner of the distribution (e.g. conda-forge or your username)]:OWNER:_default' \
'--owner=[The owner of the distribution (e.g. conda-forge or your username)]:OWNER:_default' \
'*-c+[The channel / label to upload the package to (e.g. main / rc)]:CHANNELS:_default' \
'*--channel=[The channel / label to upload the package to (e.g. main / rc)]:CHANNELS:_default' \
'-a+[The Anaconda API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'--api-key=[The Anaconda API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'-u+[The URL to the Anaconda server]:URL:_default' \
'--url=[The URL to the Anaconda server]:URL:_default' \
'-f[Replace files on conflict]' \
'--force[Replace files on conflict]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(cloudsmith)
_arguments "${_arguments_options[@]}" : \
'-o+[The owner (namespace) of the Cloudsmith repository]:OWNER:_default' \
'--owner=[The owner (namespace) of the Cloudsmith repository]:OWNER:_default' \
'-r+[The Cloudsmith repository name]:REPO:_default' \
'--repo=[The Cloudsmith repository name]:REPO:_default' \
'-a+[The Cloudsmith API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'--api-key=[The Cloudsmith API key, if none is provided, the token is read from the keychain / auth-file]:API_KEY:_default' \
'-u+[The URL to the Cloudsmith API server]:URL:_default' \
'--url=[The URL to the Cloudsmith API server]:URL:_default' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(s3)
_arguments "${_arguments_options[@]}" : \
'-c+[The channel URL in the S3 bucket to upload the package to, e.g., \`s3\://my-bucket/my-channel\`]:CHANNEL:_default' \
'--channel=[The channel URL in the S3 bucket to upload the package to, e.g., \`s3\://my-bucket/my-channel\`]:CHANNEL:_default' \
'--endpoint-url=[The endpoint URL of the S3 backend]:ENDPOINT_URL:_default' \
'--region=[The region of the S3 backend]:REGION:_default' \
'--access-key-id=[The access key ID for the S3 bucket]:ACCESS_KEY_ID:_default' \
'--secret-access-key=[The secret access key for the S3 bucket]:SECRET_ACCESS_KEY:_default' \
'--session-token=[The session token for the S3 bucket]:SESSION_TOKEN:_default' \
'(--force-path-style)--addressing-style=[How to address the bucket]:ADDRESSING_STYLE:(virtual-host path)' \
'(--addressing-style)--force-path-style=[\[deprecated\] Whether to use path-style S3 URLs]:FORCE_PATH_STYLE:(true false)' \
'--force[Replace files if it already exists]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(conda-forge)
_arguments "${_arguments_options[@]}" : \
'--staging-token=[The Anaconda API key]:STAGING_TOKEN:_default' \
'--feedstock=[The feedstock name]:FEEDSTOCK:_default' \
'--feedstock-token=[The feedstock token]:FEEDSTOCK_TOKEN:_default' \
'--staging-channel=[The staging channel name]:STAGING_CHANNEL:_default' \
'--anaconda-url=[The Anaconda Server URL]:ANACONDA_URL:_default' \
'--validation-endpoint=[The validation endpoint url]:VALIDATION_ENDPOINT:_default' \
'--provider=[The CI provider]:PROVIDER:_default' \
'--dry-run[Dry run, don'\''t actually upload anything]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::package_files -- The package file to upload:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rattler__subcmd__upload__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-upload-help-command-$line[1]:"
        case $line[1] in
            (quetz)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(artifactory)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(prefix)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(anaconda)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cloudsmith)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(s3)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(conda-forge)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-p+[The prefix to list]:PREFIX:_files' \
'--prefix=[The prefix to list]:PREFIX:_files' \
'-f[Match full names only]' \
'--full-name[Match full names only]' \
'-v[Log verbose]' \
'--verbose[Log verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- The name (or glob) of the packages to list:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rattler__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-help-command-$line[1]:"
        case $line[1] in
            (auth)
_arguments "${_arguments_options[@]}" : \
":: :_rattler__subcmd__help__subcmd__auth_commands" \
"*::: :->auth" \
&& ret=0

    case $state in
    (auth)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-help-auth-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(completion)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(download)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fetch-file)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(shell-hook)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(virtual-packages)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(install-menu)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove-menu)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(extract)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(link)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(upload)
_arguments "${_arguments_options[@]}" : \
":: :_rattler__subcmd__help__subcmd__upload_commands" \
"*::: :->upload" \
&& ret=0

    case $state in
    (upload)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rattler-help-upload-command-$line[1]:"
        case $line[1] in
            (quetz)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(artifactory)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(prefix)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(anaconda)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cloudsmith)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(s3)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(conda-forge)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_rattler_commands] )) ||
_rattler_commands() {
    local commands; commands=(
'auth:Login to prefix.dev or anaconda.org servers to access private channels' \
'completion:Generates a completion script for a shell' \
'create:Create a conda environment from package listing' \
'download:Download an arbitrary file' \
'fetch-file:Read a file from inside a remote conda package' \
'inspect:Inspect package metadata from a remote conda package' \
'search:Search for packages in conda channels using glob or regex patterns' \
'shell-hook:Print the shell activation hook for a conda prefix to stdout' \
'virtual-packages:Print detected virtual packages' \
'install-menu:Install menu items for an installed package' \
'remove-menu:Remove installed menu items for a package' \
'run:Run a command in an activated conda environment' \
'extract:Extract a local or remote conda package' \
'link:Link an extracted package into a prefix' \
'upload:Upload options' \
'list:Search for packages in conda channels using glob or regex patterns' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rattler commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth_commands] )) ||
_rattler__subcmd__auth_commands() {
    local commands; commands=(
'login:Store authentication information for a given host' \
'logout:Remove authentication information for a given host' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rattler auth commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth__subcmd__help_commands] )) ||
_rattler__subcmd__auth__subcmd__help_commands() {
    local commands; commands=(
'login:Store authentication information for a given host' \
'logout:Remove authentication information for a given host' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rattler auth help commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth__subcmd__help__subcmd__help_commands] )) ||
_rattler__subcmd__auth__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rattler auth help help commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth__subcmd__help__subcmd__login_commands] )) ||
_rattler__subcmd__auth__subcmd__help__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'rattler auth help login commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth__subcmd__help__subcmd__logout_commands] )) ||
_rattler__subcmd__auth__subcmd__help__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'rattler auth help logout commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth__subcmd__login_commands] )) ||
_rattler__subcmd__auth__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'rattler auth login commands' commands "$@"
}
(( $+functions[_rattler__subcmd__auth__subcmd__logout_commands] )) ||
_rattler__subcmd__auth__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'rattler auth logout commands' commands "$@"
}
(( $+functions[_rattler__subcmd__completion_commands] )) ||
_rattler__subcmd__completion_commands() {
    local commands; commands=()
    _describe -t commands 'rattler completion commands' commands "$@"
}
(( $+functions[_rattler__subcmd__create_commands] )) ||
_rattler__subcmd__create_commands() {
    local commands; commands=()
    _describe -t commands 'rattler create commands' commands "$@"
}
(( $+functions[_rattler__subcmd__download_commands] )) ||
_rattler__subcmd__download_commands() {
    local commands; commands=()
    _describe -t commands 'rattler download commands' commands "$@"
}
(( $+functions[_rattler__subcmd__extract_commands] )) ||
_rattler__subcmd__extract_commands() {
    local commands; commands=()
    _describe -t commands 'rattler extract commands' commands "$@"
}
(( $+functions[_rattler__subcmd__fetch-file_commands] )) ||
_rattler__subcmd__fetch-file_commands() {
    local commands; commands=()
    _describe -t commands 'rattler fetch-file commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help_commands] )) ||
_rattler__subcmd__help_commands() {
    local commands; commands=(
'auth:Login to prefix.dev or anaconda.org servers to access private channels' \
'completion:Generates a completion script for a shell' \
'create:Create a conda environment from package listing' \
'download:Download an arbitrary file' \
'fetch-file:Read a file from inside a remote conda package' \
'inspect:Inspect package metadata from a remote conda package' \
'search:Search for packages in conda channels using glob or regex patterns' \
'shell-hook:Print the shell activation hook for a conda prefix to stdout' \
'virtual-packages:Print detected virtual packages' \
'install-menu:Install menu items for an installed package' \
'remove-menu:Remove installed menu items for a package' \
'run:Run a command in an activated conda environment' \
'extract:Extract a local or remote conda package' \
'link:Link an extracted package into a prefix' \
'upload:Upload options' \
'list:Search for packages in conda channels using glob or regex patterns' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rattler help commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__auth_commands] )) ||
_rattler__subcmd__help__subcmd__auth_commands() {
    local commands; commands=(
'login:Store authentication information for a given host' \
'logout:Remove authentication information for a given host' \
    )
    _describe -t commands 'rattler help auth commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__auth__subcmd__login_commands] )) ||
_rattler__subcmd__help__subcmd__auth__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help auth login commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__auth__subcmd__logout_commands] )) ||
_rattler__subcmd__help__subcmd__auth__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help auth logout commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__completion_commands] )) ||
_rattler__subcmd__help__subcmd__completion_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help completion commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__create_commands] )) ||
_rattler__subcmd__help__subcmd__create_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help create commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__download_commands] )) ||
_rattler__subcmd__help__subcmd__download_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help download commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__extract_commands] )) ||
_rattler__subcmd__help__subcmd__extract_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help extract commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__fetch-file_commands] )) ||
_rattler__subcmd__help__subcmd__fetch-file_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help fetch-file commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__help_commands] )) ||
_rattler__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help help commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__inspect_commands] )) ||
_rattler__subcmd__help__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help inspect commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__install-menu_commands] )) ||
_rattler__subcmd__help__subcmd__install-menu_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help install-menu commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__link_commands] )) ||
_rattler__subcmd__help__subcmd__link_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help link commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__list_commands] )) ||
_rattler__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help list commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__remove-menu_commands] )) ||
_rattler__subcmd__help__subcmd__remove-menu_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help remove-menu commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__run_commands] )) ||
_rattler__subcmd__help__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help run commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__search_commands] )) ||
_rattler__subcmd__help__subcmd__search_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help search commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__shell-hook_commands] )) ||
_rattler__subcmd__help__subcmd__shell-hook_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help shell-hook commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload_commands] )) ||
_rattler__subcmd__help__subcmd__upload_commands() {
    local commands; commands=(
'quetz:Upload to a Quetz server. Authentication is used from the keychain / auth-file' \
'artifactory:Options for uploading to a Artifactory channel. Authentication is used from the keychain / auth-file' \
'prefix:Options for uploading to a prefix.dev server. Authentication is used from the keychain / auth-file' \
'anaconda:Options for uploading to a Anaconda.org server' \
'cloudsmith:Options for uploading to a Cloudsmith repository. Authentication is used from the keychain / auth-file' \
's3:Options for uploading to S3' \
'conda-forge:Options for uploading to conda-forge' \
    )
    _describe -t commands 'rattler help upload commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__anaconda_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__anaconda_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload anaconda commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__artifactory_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__artifactory_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload artifactory commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__cloudsmith_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__cloudsmith_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload cloudsmith commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__conda-forge_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__conda-forge_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload conda-forge commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__prefix_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__prefix_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload prefix commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__quetz_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__quetz_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload quetz commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__upload__subcmd__s3_commands] )) ||
_rattler__subcmd__help__subcmd__upload__subcmd__s3_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help upload s3 commands' commands "$@"
}
(( $+functions[_rattler__subcmd__help__subcmd__virtual-packages_commands] )) ||
_rattler__subcmd__help__subcmd__virtual-packages_commands() {
    local commands; commands=()
    _describe -t commands 'rattler help virtual-packages commands' commands "$@"
}
(( $+functions[_rattler__subcmd__inspect_commands] )) ||
_rattler__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'rattler inspect commands' commands "$@"
}
(( $+functions[_rattler__subcmd__install-menu_commands] )) ||
_rattler__subcmd__install-menu_commands() {
    local commands; commands=()
    _describe -t commands 'rattler install-menu commands' commands "$@"
}
(( $+functions[_rattler__subcmd__link_commands] )) ||
_rattler__subcmd__link_commands() {
    local commands; commands=()
    _describe -t commands 'rattler link commands' commands "$@"
}
(( $+functions[_rattler__subcmd__list_commands] )) ||
_rattler__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'rattler list commands' commands "$@"
}
(( $+functions[_rattler__subcmd__remove-menu_commands] )) ||
_rattler__subcmd__remove-menu_commands() {
    local commands; commands=()
    _describe -t commands 'rattler remove-menu commands' commands "$@"
}
(( $+functions[_rattler__subcmd__run_commands] )) ||
_rattler__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'rattler run commands' commands "$@"
}
(( $+functions[_rattler__subcmd__search_commands] )) ||
_rattler__subcmd__search_commands() {
    local commands; commands=()
    _describe -t commands 'rattler search commands' commands "$@"
}
(( $+functions[_rattler__subcmd__shell-hook_commands] )) ||
_rattler__subcmd__shell-hook_commands() {
    local commands; commands=()
    _describe -t commands 'rattler shell-hook commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload_commands] )) ||
_rattler__subcmd__upload_commands() {
    local commands; commands=(
'quetz:Upload to a Quetz server. Authentication is used from the keychain / auth-file' \
'artifactory:Options for uploading to a Artifactory channel. Authentication is used from the keychain / auth-file' \
'prefix:Options for uploading to a prefix.dev server. Authentication is used from the keychain / auth-file' \
'anaconda:Options for uploading to a Anaconda.org server' \
'cloudsmith:Options for uploading to a Cloudsmith repository. Authentication is used from the keychain / auth-file' \
's3:Options for uploading to S3' \
'conda-forge:Options for uploading to conda-forge' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rattler upload commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__anaconda_commands] )) ||
_rattler__subcmd__upload__subcmd__anaconda_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload anaconda commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__artifactory_commands] )) ||
_rattler__subcmd__upload__subcmd__artifactory_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload artifactory commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__cloudsmith_commands] )) ||
_rattler__subcmd__upload__subcmd__cloudsmith_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload cloudsmith commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__conda-forge_commands] )) ||
_rattler__subcmd__upload__subcmd__conda-forge_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload conda-forge commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help_commands] )) ||
_rattler__subcmd__upload__subcmd__help_commands() {
    local commands; commands=(
'quetz:Upload to a Quetz server. Authentication is used from the keychain / auth-file' \
'artifactory:Options for uploading to a Artifactory channel. Authentication is used from the keychain / auth-file' \
'prefix:Options for uploading to a prefix.dev server. Authentication is used from the keychain / auth-file' \
'anaconda:Options for uploading to a Anaconda.org server' \
'cloudsmith:Options for uploading to a Cloudsmith repository. Authentication is used from the keychain / auth-file' \
's3:Options for uploading to S3' \
'conda-forge:Options for uploading to conda-forge' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rattler upload help commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__anaconda_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__anaconda_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help anaconda commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__artifactory_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__artifactory_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help artifactory commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__cloudsmith_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__cloudsmith_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help cloudsmith commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__conda-forge_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__conda-forge_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help conda-forge commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__help_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help help commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__prefix_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__prefix_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help prefix commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__quetz_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__quetz_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help quetz commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__help__subcmd__s3_commands] )) ||
_rattler__subcmd__upload__subcmd__help__subcmd__s3_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload help s3 commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__prefix_commands] )) ||
_rattler__subcmd__upload__subcmd__prefix_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload prefix commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__quetz_commands] )) ||
_rattler__subcmd__upload__subcmd__quetz_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload quetz commands' commands "$@"
}
(( $+functions[_rattler__subcmd__upload__subcmd__s3_commands] )) ||
_rattler__subcmd__upload__subcmd__s3_commands() {
    local commands; commands=()
    _describe -t commands 'rattler upload s3 commands' commands "$@"
}
(( $+functions[_rattler__subcmd__virtual-packages_commands] )) ||
_rattler__subcmd__virtual-packages_commands() {
    local commands; commands=()
    _describe -t commands 'rattler virtual-packages commands' commands "$@"
}

if [ "$funcstack[1]" = "_rattler" ]; then
    _rattler "$@"
else
    compdef _rattler rattler
fi
