#compdef komac

autoload -U is-at-least

_komac() {
    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[]' \
'--version[]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_komac_commands" \
"*::: :->komac" \
&& ret=0
    case $state in
    (komac)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:komac-command-$line[1]:"
        case $line[1] in
            (new)
_arguments "${_arguments_options[@]}" : \
'-v+[The package'\''s version]:PACKAGE_VERSION:_default' \
'--version=[The package'\''s version]:PACKAGE_VERSION:_default' \
'*-u+[The list of package installers]:URLS:_urls' \
'*--urls=[The list of package installers]:URLS:_urls' \
'--package-locale=[]:PACKAGE_LOCALE:_default' \
'--publisher=[]:PUBLISHER:_default' \
'--publisher-url=[]:PUBLISHER_URL:_urls' \
'--publisher-support-url=[]:PUBLISHER_SUPPORT_URL:_urls' \
'--package-name=[]:PACKAGE_NAME:_default' \
'--package-url=[]:PACKAGE_URL:_urls' \
'--moniker=[]:MONIKER:_default' \
'--author=[]:AUTHOR:_default' \
'--license=[]:LICENSE:_default' \
'--license-url=[]:LICENSE_URL:_urls' \
'--copyright=[]:COPYRIGHT:_default' \
'--copyright-url=[]:COPYRIGHT_URL:_urls' \
'--short-description=[]:SHORT_DESCRIPTION:_default' \
'--description=[]:DESCRIPTION:_default' \
'--release-notes-url=[]:RELEASE_NOTES_URL:_urls' \
'--concurrent-downloads=[Number of installers to download at the same time]:CONCURRENT_DOWNLOADS:_default' \
'*--resolves=[List of issues that adding this package or version would resolve]:RESOLVES:_default' \
'--created-with=[Name of external tool that invoked Komac]:CREATED_WITH:_default' \
'--created-with-url=[URL to external tool that invoked Komac]:CREATED_WITH_URL:_urls' \
'-o+[Directory to output the manifests to]:OUTPUT:_files -/' \
'--output=[Directory to output the manifests to]:OUTPUT:_files -/' \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-s[Automatically submit a pull request]' \
'--submit[Automatically submit a pull request]' \
'--open-pr[Open pull request link automatically]' \
'--dry-run[Run without prompting or submitting]' \
'--skip-pr-check[Skip checking for existing pull requests]' \
'-h[Print help]' \
'--help[Print help]' \
'::package_identifier -- The package'\''s unique identifier:_default' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'-v+[The package'\''s version]:PACKAGE_VERSION:_default' \
'--version=[The package'\''s version]:PACKAGE_VERSION:_default' \
'*-u+[The list of package installers]:URLS:_urls' \
'*--urls=[The list of package installers]:URLS:_urls' \
'--concurrent-downloads=[Number of installers to download at the same time]:CONCURRENT_DOWNLOADS:_default' \
'*--resolves=[List of issues that updating this package would resolve]:RESOLVES:_default' \
'--release-notes-url=[URL to package'\''s release notes]:RELEASE_NOTES_URL:_urls' \
'--created-with=[Name of external tool that invoked Komac]:CREATED_WITH:_default' \
'--created-with-url=[URL to external tool that invoked Komac]:CREATED_WITH_URL:_urls' \
'-o+[Directory to output the manifests to]:OUTPUT:_files -/' \
'--output=[Directory to output the manifests to]:OUTPUT:_files -/' \
'-r+[Package version to replace]::REPLACE:_default' \
'--replace=[Package version to replace]::REPLACE:_default' \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-s[Automatically submit a pull request]' \
'--submit[Automatically submit a pull request]' \
'--open-pr[Open pull request link automatically]' \
'--dry-run[Run without submitting]' \
'--skip-pr-check[Skip checking for existing pull requests]' \
'-h[Print help]' \
'--help[Print help]' \
':package_identifier -- The package'\''s unique identifier:_default' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'-v+[The package'\''s version]:PACKAGE_VERSION:_default' \
'--version=[The package'\''s version]:PACKAGE_VERSION:_default' \
'-r+[]:DELETION_REASON:_default' \
'--reason=[]:DELETION_REASON:_default' \
'*--resolves=[List of issues that removing this version would resolve]:RESOLVES:_default' \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-s[]' \
'--submit[]' \
'--no-warning[Don'\''t show the package removal warning]' \
'--open-pr[Open pull request link automatically]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':package_identifier -- The package'\''s unique identifier:_default' \
&& ret=0
;;
(cleanup)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--only-merged[Only delete merged branches]' \
'--only-closed[Only delete closed branches]' \
'-a[Automatically delete all relevant branches]' \
'--all[Automatically delete all relevant branches]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clean)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--only-merged[Only delete merged branches]' \
'--only-closed[Only delete closed branches]' \
'-a[Automatically delete all relevant branches]' \
'--all[Automatically delete all relevant branches]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(token)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_komac__token_commands" \
"*::: :->token" \
&& ret=0

    case $state in
    (token)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:komac-token-command-$line[1]:"
        case $line[1] in
            (update)
_arguments "${_arguments_options[@]}" : \
'-t+[The new token to store]:TOKEN:_default' \
'--token=[The new token to store]:TOKEN:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-t+[The new token to store]:TOKEN:_default' \
'--token=[The new token to store]:TOKEN:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
'-t+[The new token to store]:TOKEN:_default' \
'--token=[The new token to store]:TOKEN:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'-y[Skip the confirmation prompt to delete the token]' \
'--yes[Skip the confirmation prompt to delete the token]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-y[Skip the confirmation prompt to delete the token]' \
'--yes[Skip the confirmation prompt to delete the token]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_komac__token__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:komac-token-help-command-$line[1]:"
        case $line[1] in
            (update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--json[Output the versions as JSON]' \
'--pretty-json[Output the versions as prettified JSON]' \
'--yaml[Output the versions as YAML]' \
'--count[Output the number of versions the package has]' \
'-h[Print help]' \
'--help[Print help]' \
':package_identifier:_default' \
&& ret=0
;;
(list-versions)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--json[Output the versions as JSON]' \
'--pretty-json[Output the versions as prettified JSON]' \
'--yaml[Output the versions as YAML]' \
'--count[Output the number of versions the package has]' \
'-h[Print help]' \
'--help[Print help]' \
':package_identifier:_default' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'-v+[The package'\''s version]:PACKAGE_VERSION:_default' \
'--version=[The package'\''s version]:PACKAGE_VERSION:_default' \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-i[Switch to display the installer manifest]' \
'--installer-manifest[Switch to display the installer manifest]' \
'-d[Switch to display the default locale manifest]' \
'--defaultlocale-manifest[Switch to display the default locale manifest]' \
'-l[Switch to display all locale manifests]' \
'--locale-manifests[Switch to display all locale manifests]' \
'--version-manifest[Switch to display the version manifest]' \
'-h[Print help]' \
'--help[Print help]' \
':package_identifier -- The package'\''s unique identifier:_default' \
&& ret=0
;;
(sync)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-f[Merges changes even if the fork'\''s default branch is not fast-forward. This is not recommended as you should instead have a clean default branch that has not diverged from the upstream default branch]' \
'--force[Merges changes even if the fork'\''s default branch is not fast-forward. This is not recommended as you should instead have a clean default branch that has not diverged from the upstream default branch]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(sync-fork)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-f[Merges changes even if the fork'\''s default branch is not fast-forward. This is not recommended as you should instead have a clean default branch that has not diverged from the upstream default branch]' \
'--force[Merges changes even if the fork'\''s default branch is not fast-forward. This is not recommended as you should instead have a clean default branch that has not diverged from the upstream default branch]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(merge-upstream)
_arguments "${_arguments_options[@]}" : \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-f[Merges changes even if the fork'\''s default branch is not fast-forward. This is not recommended as you should instead have a clean default branch that has not diverged from the upstream default branch]' \
'--force[Merges changes even if the fork'\''s default branch is not fast-forward. This is not recommended as you should instead have a clean default branch that has not diverged from the upstream default branch]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(complete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::shell -- Specifies the shell for which to generate the completion script:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(autocomplete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::shell -- Specifies the shell for which to generate the completion script:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(analyze)
_arguments "${_arguments_options[@]}" : \
'--hash[Hash the file and include it in the \`InstallerSha256\` field]' \
'--no-hash[Skip hashing the file]' \
'-h[Print help]' \
'--help[Print help]' \
':file_path:_files' \
&& ret=0
;;
(analyse)
_arguments "${_arguments_options[@]}" : \
'--hash[Hash the file and include it in the \`InstallerSha256\` field]' \
'--no-hash[Skip hashing the file]' \
'-h[Print help]' \
'--help[Print help]' \
':file_path:_files' \
&& ret=0
;;
(remove-dead-versions)
_arguments "${_arguments_options[@]}" : \
'--before=[Check versions lesser than a given version]:BEFORE:_default' \
'--after=[Check versions greater than a given version]:AFTER:_default' \
'-c+[Number of versions to check concurrently]:CONCURRENT:_default' \
'--concurrent=[Number of versions to check concurrently]:CONCURRENT:_default' \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--fast[Use the per-minute rate limit, potentially hitting the hourly rate limit in 7.5 minutes]' \
'--auto[Automatically create pull requests to remove dead versions without prompting]' \
'-h[Print help]' \
'--help[Print help]' \
':package_identifier:_default' \
&& ret=0
;;
(submit)
_arguments "${_arguments_options[@]}" : \
'*--resolves=[List of issues that submitting this version would resolve]:RESOLVES:_default' \
'-t+[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'--token=[GitHub personal access token with the \`public_repo\` scope]:TOKEN:_default' \
'-y[Skip the confirmation prompt to submit the package]' \
'--yes[Skip the confirmation prompt to submit the package]' \
'--submit[Skip the confirmation prompt to submit the package]' \
'-a[Submit all packages present in the folder]' \
'--all[Submit all packages present in the folder]' \
'--open-pr[Open pull request link automatically]' \
'--fast[Use the per-minute rate limit, potentially hitting the hourly rate limit in 7.5 minutes]' \
'--dry-run[Run without submitting]' \
'-h[Print help]' \
'--help[Print help]' \
':path:_files -/' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_komac__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:komac-help-command-$line[1]:"
        case $line[1] in
            (new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cleanup)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(token)
_arguments "${_arguments_options[@]}" : \
":: :_komac__help__token_commands" \
"*::: :->token" \
&& ret=0

    case $state in
    (token)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:komac-help-token-command-$line[1]:"
        case $line[1] in
            (update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(sync)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(complete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(analyze)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove-dead-versions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(submit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_komac_commands] )) ||
_komac_commands() {
    local commands; commands=(
'new:Create a new package from scratch' \
'update:Add a version to a pre-existing package' \
'remove:Remove a version from winget-pkgs' \
'cleanup:Finds branches from the fork of winget-pkgs that have had a merged or closed pull request to microsoft/winget-pkgs from them, prompting for which ones to delete' \
'clean:Finds branches from the fork of winget-pkgs that have had a merged or closed pull request to microsoft/winget-pkgs from them, prompting for which ones to delete' \
'token:' \
'list:Lists all versions for a given package' \
'list-versions:Lists all versions for a given package' \
'show:Output the manifests for a given package and version' \
'sync:Merges changes from microsoft/winget-pkgs into the fork repository' \
'sync-fork:Merges changes from microsoft/winget-pkgs into the fork repository' \
'merge-upstream:Merges changes from microsoft/winget-pkgs into the fork repository' \
'complete:Outputs an autocompletion script for the given shell. Example usage\:' \
'autocomplete:Outputs an autocompletion script for the given shell. Example usage\:' \
'analyze:Analyzes a file and outputs information about it' \
'analyse:Analyzes a file and outputs information about it' \
'remove-dead-versions:' \
'submit:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'komac commands' commands "$@"
}
(( $+functions[_komac__analyze_commands] )) ||
_komac__analyze_commands() {
    local commands; commands=()
    _describe -t commands 'komac analyze commands' commands "$@"
}
(( $+functions[_komac__cleanup_commands] )) ||
_komac__cleanup_commands() {
    local commands; commands=()
    _describe -t commands 'komac cleanup commands' commands "$@"
}
(( $+functions[_komac__complete_commands] )) ||
_komac__complete_commands() {
    local commands; commands=()
    _describe -t commands 'komac complete commands' commands "$@"
}
(( $+functions[_komac__help_commands] )) ||
_komac__help_commands() {
    local commands; commands=(
'new:Create a new package from scratch' \
'update:Add a version to a pre-existing package' \
'remove:Remove a version from winget-pkgs' \
'cleanup:Finds branches from the fork of winget-pkgs that have had a merged or closed pull request to microsoft/winget-pkgs from them, prompting for which ones to delete' \
'token:' \
'list:Lists all versions for a given package' \
'show:Output the manifests for a given package and version' \
'sync:Merges changes from microsoft/winget-pkgs into the fork repository' \
'complete:Outputs an autocompletion script for the given shell. Example usage\:' \
'analyze:Analyzes a file and outputs information about it' \
'remove-dead-versions:' \
'submit:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'komac help commands' commands "$@"
}
(( $+functions[_komac__help__analyze_commands] )) ||
_komac__help__analyze_commands() {
    local commands; commands=()
    _describe -t commands 'komac help analyze commands' commands "$@"
}
(( $+functions[_komac__help__cleanup_commands] )) ||
_komac__help__cleanup_commands() {
    local commands; commands=()
    _describe -t commands 'komac help cleanup commands' commands "$@"
}
(( $+functions[_komac__help__complete_commands] )) ||
_komac__help__complete_commands() {
    local commands; commands=()
    _describe -t commands 'komac help complete commands' commands "$@"
}
(( $+functions[_komac__help__help_commands] )) ||
_komac__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'komac help help commands' commands "$@"
}
(( $+functions[_komac__help__list_commands] )) ||
_komac__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'komac help list commands' commands "$@"
}
(( $+functions[_komac__help__new_commands] )) ||
_komac__help__new_commands() {
    local commands; commands=()
    _describe -t commands 'komac help new commands' commands "$@"
}
(( $+functions[_komac__help__remove_commands] )) ||
_komac__help__remove_commands() {
    local commands; commands=()
    _describe -t commands 'komac help remove commands' commands "$@"
}
(( $+functions[_komac__help__remove-dead-versions_commands] )) ||
_komac__help__remove-dead-versions_commands() {
    local commands; commands=()
    _describe -t commands 'komac help remove-dead-versions commands' commands "$@"
}
(( $+functions[_komac__help__show_commands] )) ||
_komac__help__show_commands() {
    local commands; commands=()
    _describe -t commands 'komac help show commands' commands "$@"
}
(( $+functions[_komac__help__submit_commands] )) ||
_komac__help__submit_commands() {
    local commands; commands=()
    _describe -t commands 'komac help submit commands' commands "$@"
}
(( $+functions[_komac__help__sync_commands] )) ||
_komac__help__sync_commands() {
    local commands; commands=()
    _describe -t commands 'komac help sync commands' commands "$@"
}
(( $+functions[_komac__help__token_commands] )) ||
_komac__help__token_commands() {
    local commands; commands=(
'update:Update the stored token' \
'remove:Remove the stored token' \
    )
    _describe -t commands 'komac help token commands' commands "$@"
}
(( $+functions[_komac__help__token__remove_commands] )) ||
_komac__help__token__remove_commands() {
    local commands; commands=()
    _describe -t commands 'komac help token remove commands' commands "$@"
}
(( $+functions[_komac__help__token__update_commands] )) ||
_komac__help__token__update_commands() {
    local commands; commands=()
    _describe -t commands 'komac help token update commands' commands "$@"
}
(( $+functions[_komac__help__update_commands] )) ||
_komac__help__update_commands() {
    local commands; commands=()
    _describe -t commands 'komac help update commands' commands "$@"
}
(( $+functions[_komac__list_commands] )) ||
_komac__list_commands() {
    local commands; commands=()
    _describe -t commands 'komac list commands' commands "$@"
}
(( $+functions[_komac__new_commands] )) ||
_komac__new_commands() {
    local commands; commands=()
    _describe -t commands 'komac new commands' commands "$@"
}
(( $+functions[_komac__remove_commands] )) ||
_komac__remove_commands() {
    local commands; commands=()
    _describe -t commands 'komac remove commands' commands "$@"
}
(( $+functions[_komac__remove-dead-versions_commands] )) ||
_komac__remove-dead-versions_commands() {
    local commands; commands=()
    _describe -t commands 'komac remove-dead-versions commands' commands "$@"
}
(( $+functions[_komac__show_commands] )) ||
_komac__show_commands() {
    local commands; commands=()
    _describe -t commands 'komac show commands' commands "$@"
}
(( $+functions[_komac__submit_commands] )) ||
_komac__submit_commands() {
    local commands; commands=()
    _describe -t commands 'komac submit commands' commands "$@"
}
(( $+functions[_komac__sync_commands] )) ||
_komac__sync_commands() {
    local commands; commands=()
    _describe -t commands 'komac sync commands' commands "$@"
}
(( $+functions[_komac__token_commands] )) ||
_komac__token_commands() {
    local commands; commands=(
'update:Update the stored token' \
'new:Update the stored token' \
'add:Update the stored token' \
'remove:Remove the stored token' \
'delete:Remove the stored token' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'komac token commands' commands "$@"
}
(( $+functions[_komac__token__help_commands] )) ||
_komac__token__help_commands() {
    local commands; commands=(
'update:Update the stored token' \
'remove:Remove the stored token' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'komac token help commands' commands "$@"
}
(( $+functions[_komac__token__help__help_commands] )) ||
_komac__token__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'komac token help help commands' commands "$@"
}
(( $+functions[_komac__token__help__remove_commands] )) ||
_komac__token__help__remove_commands() {
    local commands; commands=()
    _describe -t commands 'komac token help remove commands' commands "$@"
}
(( $+functions[_komac__token__help__update_commands] )) ||
_komac__token__help__update_commands() {
    local commands; commands=()
    _describe -t commands 'komac token help update commands' commands "$@"
}
(( $+functions[_komac__token__remove_commands] )) ||
_komac__token__remove_commands() {
    local commands; commands=()
    _describe -t commands 'komac token remove commands' commands "$@"
}
(( $+functions[_komac__token__update_commands] )) ||
_komac__token__update_commands() {
    local commands; commands=()
    _describe -t commands 'komac token update commands' commands "$@"
}
(( $+functions[_komac__update_commands] )) ||
_komac__update_commands() {
    local commands; commands=()
    _describe -t commands 'komac update commands' commands "$@"
}

if [ "$funcstack[1]" = "_komac" ]; then
    _komac "$@"
else
    compdef _komac komac
fi
