#compdef prek

autoload -U is-at-least

_prek() {
    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[@]}" : \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'(-a --all-files -s --from-ref -o --to-ref)*--files=[Run hooks on the specified file paths]::FILES:_files' \
'(-a --all-files -s --from-ref -o --to-ref)*--glob=[Run hooks on tracked files matching the specified glob pattern]:PATTERN:_default' \
'(-a --all-files -s --from-ref -o --to-ref)*-d+[Run hooks on tracked files under the specified directory]:DIR:_files -/' \
'(-a --all-files -s --from-ref -o --to-ref)*--directory=[Run hooks on tracked files under the specified directory]:DIR:_files -/' \
'-s+[The original ref in a \`<from_ref>...<to_ref>\` diff expression. Files changed in this diff will be run through the hooks]:FROM_REF:' \
'--from-ref=[The original ref in a \`<from_ref>...<to_ref>\` diff expression. Files changed in this diff will be run through the hooks]:FROM_REF:' \
'-o+[The destination ref in a \`from_ref...to_ref\` diff expression. Defaults to \`HEAD\` if \`from_ref\` is specified]:TO_REF:' \
'--to-ref=[The destination ref in a \`from_ref...to_ref\` diff expression. Defaults to \`HEAD\` if \`from_ref\` is specified]:TO_REF:' \
'--remote-branch=[]:REMOTE_BRANCH:_default' \
'--local-branch=[]:LOCAL_BRANCH:_default' \
'--pre-rebase-upstream=[]:PRE_REBASE_UPSTREAM:_default' \
'--pre-rebase-branch=[]:PRE_REBASE_BRANCH:_default' \
'--commit-msg-filename=[]:COMMIT_MSG_FILENAME:_default' \
'--prepare-commit-message-source=[]:PREPARE_COMMIT_MESSAGE_SOURCE:_default' \
'--commit-object-name=[]:COMMIT_OBJECT_NAME:_default' \
'--remote-name=[]:REMOTE_NAME:_default' \
'--remote-url=[]:REMOTE_URL:_default' \
'--checkout-type=[]:CHECKOUT_TYPE:_default' \
'--rewrite-command=[]:REWRITE_COMMAND:_default' \
'--stage=[The stage during which the hook is fired]:STAGE:(manual commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'*--group=[Run hooks belonging to the specified group]:GROUP:_default' \
'*--require-group=[Run hooks belonging to every specified group]:GROUP:_default' \
'*--no-group=[Do not run hooks belonging to the specified group]:GROUP:_default' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'(--files --glob -s --from-ref -o --to-ref)-a[Run hooks on all tracked files in the repository]' \
'(--files --glob -s --from-ref -o --to-ref)--all-files[Run hooks on all tracked files in the repository]' \
'(-a --all-files --files --glob -d --directory -s --from-ref -o --to-ref)--last-commit[Run hooks against the last commit. Equivalent to \`--from-ref HEAD~1 --to-ref HEAD\`]' \
'--show-diff-on-failure[When hooks fail, run \`git diff\` directly afterward]' \
'--fail-fast[Stop running hooks after the first failure]' \
'--no-fail-fast[Do not stop running hooks after the first failure]' \
'--dry-run[Do not run the hooks, but print the hooks that would have been run]' \
'--is-squash-merge[]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'::includes -- Include the specified hooks or projects:' \
":: :_prek_commands" \
"*::: :->prek" \
&& ret=0
    case $state in
    (prek)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:prek-command-$line[2]:"
        case $line[2] in
            (install)
_arguments "${_arguments_options[@]}" : \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'*-t+[Which Git shim(s) to install]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'*--hook-type=[Which Git shim(s) to install]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'--git-dir=[Install Git shims into the \`hooks\` subdirectory of the given git directory (\`<GIT_DIR>/hooks/\`)]:GIT_DIR:_files -/' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'-f[Force installation and overwrite existing Git shims]' \
'--force[Force installation and overwrite existing Git shims]' \
'--prepare-hooks[Also prepare environments for all hooks used in the config file]' \
'--allow-missing-config[Allow a missing configuration file]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::includes -- Include the specified hooks or projects:' \
&& ret=0
;;
(prepare-hooks)
_arguments "${_arguments_options[@]}" : \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::includes -- Include the specified hooks or projects:' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'(-a --all-files -s --from-ref -o --to-ref)*--files=[Run hooks on the specified file paths]::FILES:_files' \
'(-a --all-files -s --from-ref -o --to-ref)*--glob=[Run hooks on tracked files matching the specified glob pattern]:PATTERN:_default' \
'(-a --all-files -s --from-ref -o --to-ref)*-d+[Run hooks on tracked files under the specified directory]:DIR:_files -/' \
'(-a --all-files -s --from-ref -o --to-ref)*--directory=[Run hooks on tracked files under the specified directory]:DIR:_files -/' \
'-s+[The original ref in a \`<from_ref>...<to_ref>\` diff expression. Files changed in this diff will be run through the hooks]:FROM_REF:' \
'--from-ref=[The original ref in a \`<from_ref>...<to_ref>\` diff expression. Files changed in this diff will be run through the hooks]:FROM_REF:' \
'-o+[The destination ref in a \`from_ref...to_ref\` diff expression. Defaults to \`HEAD\` if \`from_ref\` is specified]:TO_REF:' \
'--to-ref=[The destination ref in a \`from_ref...to_ref\` diff expression. Defaults to \`HEAD\` if \`from_ref\` is specified]:TO_REF:' \
'--remote-branch=[]:REMOTE_BRANCH:_default' \
'--local-branch=[]:LOCAL_BRANCH:_default' \
'--pre-rebase-upstream=[]:PRE_REBASE_UPSTREAM:_default' \
'--pre-rebase-branch=[]:PRE_REBASE_BRANCH:_default' \
'--commit-msg-filename=[]:COMMIT_MSG_FILENAME:_default' \
'--prepare-commit-message-source=[]:PREPARE_COMMIT_MESSAGE_SOURCE:_default' \
'--commit-object-name=[]:COMMIT_OBJECT_NAME:_default' \
'--remote-name=[]:REMOTE_NAME:_default' \
'--remote-url=[]:REMOTE_URL:_default' \
'--checkout-type=[]:CHECKOUT_TYPE:_default' \
'--rewrite-command=[]:REWRITE_COMMAND:_default' \
'--stage=[The stage during which the hook is fired]:STAGE:(manual commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'*--group=[Run hooks belonging to the specified group]:GROUP:_default' \
'*--require-group=[Run hooks belonging to every specified group]:GROUP:_default' \
'*--no-group=[Do not run hooks belonging to the specified group]:GROUP:_default' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'(--files --glob -s --from-ref -o --to-ref)-a[Run hooks on all tracked files in the repository]' \
'(--files --glob -s --from-ref -o --to-ref)--all-files[Run hooks on all tracked files in the repository]' \
'(-a --all-files --files --glob -d --directory -s --from-ref -o --to-ref)--last-commit[Run hooks against the last commit. Equivalent to \`--from-ref HEAD~1 --to-ref HEAD\`]' \
'--show-diff-on-failure[When hooks fail, run \`git diff\` directly afterward]' \
'--fail-fast[Stop running hooks after the first failure]' \
'--no-fail-fast[Do not stop running hooks after the first failure]' \
'--dry-run[Do not run the hooks, but print the hooks that would have been run]' \
'--is-squash-merge[]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::includes -- Include the specified hooks or projects:' \
&& ret=0
;;
(exec)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
':selector -- Hook whose execution environment should be used:' \
'*::command -- Command and arguments to execute:_cmdambivalent' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'*--group=[Show hooks belonging to the specified group]:GROUP:_default' \
'*--require-group=[Show hooks belonging to every specified group]:GROUP:_default' \
'*--no-group=[Do not show hooks belonging to the specified group]:GROUP:_default' \
'--hook-stage=[Show only hooks that has the specified stage]:HOOK_STAGE:(manual commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'--language=[Show only hooks that are implemented in the specified language]:LANGUAGE:(bun conda coursier dart deno docker docker-image dotnet fail golang haskell julia lua mise node perl php pygrep python r ruby rust script swift system)' \
'--output-format=[The output format]:OUTPUT_FORMAT:(text json)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::includes -- Include the specified hooks or projects:' \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
'*-t+[Which Git shim(s) to uninstall]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'*--hook-type=[Which Git shim(s) to uninstall]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'--git-dir=[Uninstall Git shims from the \`hooks\` subdirectory of the given git directory (\`<GIT_DIR>/hooks/\`)]:GIT_DIR:_files -/' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'(-t --hook-type)--all[Uninstall all prek-managed Git shims]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(validate-config)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::configs -- The path to the configuration file:_files' \
&& ret=0
;;
(validate-manifest)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::manifests -- The path to the manifest file:_files' \
&& ret=0
;;
(sample-config)
_arguments "${_arguments_options[@]}" : \
'-f+[Write the sample config to a file]::FILE:_files' \
'--file=[Write the sample config to a file]::FILE:_files' \
'--format=[Select the sample configuration format]:FORMAT:(yaml toml)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'(--exclude-repo)*--repo=[Only update this repository. This option may be specified multiple times]:REPO:_default' \
'*--exclude-repo=[Do not update this repository. This option may be specified multiple times]:REPO:_default' \
'(--bleeding-edge)*--include-tag=[Only consider tags matching this glob pattern. This option may be specified multiple times. Defaults to \`update.include_tags\` in the project or global config when unset]:PATTERN:_default' \
'(--bleeding-edge)*--exclude-tag=[Ignore tags matching this glob pattern. This option may be specified multiple times. Defaults to \`update.exclude_tags\` in the project or global config when unset]:PATTERN:_default' \
'(--bleeding-edge)*--repo-include-tag=[Only consider tags matching this glob pattern for a repository (\`<repo>=<pattern>\`). This option may be specified multiple times. Overrides the effective include filters for the named repository]:REPO=PATTERN:_default' \
'(--bleeding-edge)*--repo-exclude-tag=[Ignore tags matching this glob pattern for a repository (\`<repo>=<pattern>\`). This option may be specified multiple times. Adds to the effective \`update\` exclude filters for the named repository]:REPO=PATTERN:_default' \
'-j+[Number of threads to use]:JOBS:_default' \
'--jobs=[Number of threads to use]:JOBS:_default' \
'(--bleeding-edge)--cooldown-days=[Minimum release age (in days) required for a version to be eligible]:DAYS:_default' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--bleeding-edge[Update to the bleeding edge of the default branch instead of the latest tagged version]' \
'--freeze[Store "frozen" hashes in \`rev\` instead of tag names. Defaults to \`update.freeze\` in the project or global config, or \`false\` when unset]' \
'--dry-run[Do not write changes to the config file, only display what would be changed]' \
'--exit-code[Exit with status 1 if updates are available]' \
'--check[Alias of \`--dry-run --exit-code\`]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(cache)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
":: :_prek__subcmd__cache_commands" \
"*::: :->cache" \
&& ret=0

    case $state in
    (cache)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:prek-cache-command-$line[1]:"
        case $line[1] in
            (dir)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(gc)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--dry-run[Print what would be removed, but do not delete anything]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(clean)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(size)
_arguments "${_arguments_options[@]}" : \
'--output-format=[Select the output format]:OUTPUT_FORMAT:((auto\:"Display a human-readable size in terminals and raw bytes otherwise"
human\:"Display the cache size in a human-readable format"
machine\:"Display the cache size in raw bytes"))' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'(--output-format)-H[Display the cache size in human-readable format (e.g., \`1.2GiB\` instead of raw bytes)]' \
'(--output-format)--human[Display the cache size in human-readable format (e.g., \`1.2GiB\` instead of raw bytes)]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(gc)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--dry-run[Print what would be removed, but do not delete anything]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(clean)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(init-template-dir)
_arguments "${_arguments_options[@]}" : \
'*-t+[Which Git shim(s) to install]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'*--hook-type=[Which Git shim(s) to install]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--no-allow-missing-config[Assume cloned repos should have a \`pre-commit\` config]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
':directory -- The directory in which to write the Git shim:_files' \
&& ret=0
;;
(try-repo)
_arguments "${_arguments_options[@]}" : \
'--rev=[Manually select a rev to run against, otherwise the \`HEAD\` revision will be used]:REV:_default' \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'(-a --all-files -s --from-ref -o --to-ref)*--files=[Run hooks on the specified file paths]::FILES:_files' \
'(-a --all-files -s --from-ref -o --to-ref)*--glob=[Run hooks on tracked files matching the specified glob pattern]:PATTERN:_default' \
'(-a --all-files -s --from-ref -o --to-ref)*-d+[Run hooks on tracked files under the specified directory]:DIR:_files -/' \
'(-a --all-files -s --from-ref -o --to-ref)*--directory=[Run hooks on tracked files under the specified directory]:DIR:_files -/' \
'-s+[The original ref in a \`<from_ref>...<to_ref>\` diff expression. Files changed in this diff will be run through the hooks]:FROM_REF:' \
'--from-ref=[The original ref in a \`<from_ref>...<to_ref>\` diff expression. Files changed in this diff will be run through the hooks]:FROM_REF:' \
'-o+[The destination ref in a \`from_ref...to_ref\` diff expression. Defaults to \`HEAD\` if \`from_ref\` is specified]:TO_REF:' \
'--to-ref=[The destination ref in a \`from_ref...to_ref\` diff expression. Defaults to \`HEAD\` if \`from_ref\` is specified]:TO_REF:' \
'--remote-branch=[]:REMOTE_BRANCH:_default' \
'--local-branch=[]:LOCAL_BRANCH:_default' \
'--pre-rebase-upstream=[]:PRE_REBASE_UPSTREAM:_default' \
'--pre-rebase-branch=[]:PRE_REBASE_BRANCH:_default' \
'--commit-msg-filename=[]:COMMIT_MSG_FILENAME:_default' \
'--prepare-commit-message-source=[]:PREPARE_COMMIT_MESSAGE_SOURCE:_default' \
'--commit-object-name=[]:COMMIT_OBJECT_NAME:_default' \
'--remote-name=[]:REMOTE_NAME:_default' \
'--remote-url=[]:REMOTE_URL:_default' \
'--checkout-type=[]:CHECKOUT_TYPE:_default' \
'--rewrite-command=[]:REWRITE_COMMAND:_default' \
'--stage=[The stage during which the hook is fired]:STAGE:(manual commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'(--files --glob -s --from-ref -o --to-ref)-a[Run hooks on all tracked files in the repository]' \
'(--files --glob -s --from-ref -o --to-ref)--all-files[Run hooks on all tracked files in the repository]' \
'(-a --all-files --files --glob -d --directory -s --from-ref -o --to-ref)--last-commit[Run hooks against the last commit. Equivalent to \`--from-ref HEAD~1 --to-ref HEAD\`]' \
'--show-diff-on-failure[When hooks fail, run \`git diff\` directly afterward]' \
'--fail-fast[Stop running hooks after the first failure]' \
'--no-fail-fast[Do not stop running hooks after the first failure]' \
'--dry-run[Do not run the hooks, but print the hooks that would have been run]' \
'--is-squash-merge[]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
':repo -- Repository to source hooks from:_default' \
'*::includes -- Include the specified hooks or projects:' \
&& ret=0
;;
(hook-impl)
_arguments "${_arguments_options[@]}" : \
'*--skip=[Skip the specified hooks or projects]:HOOK|PROJECT:_default' \
'--hook-type=[]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'--hook-dir=[]:HOOK_DIR:_files' \
'--script-version=[The prek version that installs the hook]:SCRIPT_VERSION:_default' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--skip-on-missing-config[]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::includes -- Include the specified hooks or projects:' \
&& ret=0
;;
(util)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
":: :_prek__subcmd__util_commands" \
"*::: :->util" \
&& ret=0

    case $state in
    (util)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:prek-util-command-$line[1]:"
        case $line[1] in
            (identify)
_arguments "${_arguments_options[@]}" : \
'--output-format=[The output format]:OUTPUT_FORMAT:(text json)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'*::paths -- The path(s) to the file(s) to identify:_files' \
&& ret=0
;;
(list-builtins)
_arguments "${_arguments_options[@]}" : \
'--output-format=[The output format]:OUTPUT_FORMAT:(text json)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
&& ret=0
;;
(init-template-dir)
_arguments "${_arguments_options[@]}" : \
'*-t+[Which Git shim(s) to install]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'*--hook-type=[Which Git shim(s) to install]:HOOK_TYPE:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--no-allow-missing-config[Assume cloned repos should have a \`pre-commit\` config]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
':directory -- The directory in which to write the Git shim:_files' \
&& ret=0
;;
(yaml-to-toml)
_arguments "${_arguments_options[@]}" : \
'-o+[Path to write the generated prek.toml file. Defaults to \`prek.toml\` in the same directory as the input file]:OUTPUT:_files' \
'--output=[Path to write the generated prek.toml file. Defaults to \`prek.toml\` in the same directory as the input file]:OUTPUT:_files' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--force[Overwrite the output file if it already exists]' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'::input -- The YAML configuration file to convert. If omitted, discovers `.pre-commit-config.yaml` or `.pre-commit-config.yml` in the current directory:_files' \
&& ret=0
;;
(generate-shell-completion)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
':shell -- The shell to generate the completion script for:(bash elvish fish powershell zsh)' \
&& ret=0
;;
        esac
    ;;
esac
;;
(self)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
":: :_prek__subcmd__self_commands" \
"*::: :->self" \
&& ret=0

    case $state in
    (self)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:prek-self-command-$line[1]:"
        case $line[1] in
            (update)
_arguments "${_arguments_options[@]}" : \
'--token=[A GitHub token for authentication. A token is not required but can be used to reduce the chance of encountering rate limits]:TOKEN:_default' \
'-c+[Path to alternate config file]:CONFIG:_files' \
'--config=[Path to alternate config file]:CONFIG:_files' \
'-C+[Change to directory before running]:DIR:_files -/' \
'--cd=[Change to directory before running]:DIR:_files -/' \
'--color=[Whether to use color in output]:COLOR:((auto\:"Enables colored output only when the output is going to a terminal or TTY with support"
always\:"Enables colored output regardless of the detected environment"
never\:"Disables colored output"))' \
'--log-file=[Write trace logs to the specified file. If not specified, trace logs will be written to \`\$PREK_HOME/prek.log\`]:LOG_FILE:_files' \
'--refresh[Refresh all cached data]' \
'-h[Display the concise help for this command]' \
'--help[Display the concise help for this command]' \
'--no-progress[Hide all progress outputs]' \
'(-v --verbose)*-q[Use quiet output]' \
'(-v --verbose)*--quiet[Use quiet output]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'--no-log-file[Do not write trace logs to a log file]' \
'-V[Display the prek version]' \
'--version[Display the prek version]' \
'--show-settings[Show the resolved settings for the current command]' \
'::target_version -- Update to the specified version. If not provided, prek will update to the latest version:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_prek_commands] )) ||
_prek_commands() {
    local commands; commands=(
'install:Install prek Git hook shims' \
'prepare-hooks:Prepare environments for configured hooks' \
'run:Run configured hooks' \
'exec:Run a command in the environment prepared for a configured hook' \
'list:List configured hooks' \
'uninstall:Uninstall prek Git hook shims' \
'validate-config:Validate prek configuration files' \
'validate-manifest:Validate pre-commit hook manifests (\`.pre-commit-hooks.yaml\`)' \
'sample-config:Generate a sample prek configuration file' \
'update:Update configured repositories' \
'cache:Manage the prek cache' \
'gc:Remove unused cached repositories, hook environments, and other data' \
'clean:Remove all prek cached data' \
'init-template-dir:Install Git shims in a directory intended for use with \`git config init.templateDir\`' \
'try-repo:Try hooks from a repository' \
'hook-impl:The implementation of the prek Git shim that is installed in Git'\''s effective hooks directory' \
'util:Run utility commands' \
'self:Manage the prek installation' \
    )
    _describe -t commands 'prek commands' commands "$@"
}
(( $+functions[_prek__subcmd__cache_commands] )) ||
_prek__subcmd__cache_commands() {
    local commands; commands=(
'dir:Show the location of the prek cache' \
'gc:Remove unused cached repositories, hook environments, and other data' \
'clean:Remove all prek cached data' \
'size:Show the size of the prek cache' \
    )
    _describe -t commands 'prek cache commands' commands "$@"
}
(( $+functions[_prek__subcmd__cache__subcmd__clean_commands] )) ||
_prek__subcmd__cache__subcmd__clean_commands() {
    local commands; commands=()
    _describe -t commands 'prek cache clean commands' commands "$@"
}
(( $+functions[_prek__subcmd__cache__subcmd__dir_commands] )) ||
_prek__subcmd__cache__subcmd__dir_commands() {
    local commands; commands=()
    _describe -t commands 'prek cache dir commands' commands "$@"
}
(( $+functions[_prek__subcmd__cache__subcmd__gc_commands] )) ||
_prek__subcmd__cache__subcmd__gc_commands() {
    local commands; commands=()
    _describe -t commands 'prek cache gc commands' commands "$@"
}
(( $+functions[_prek__subcmd__cache__subcmd__size_commands] )) ||
_prek__subcmd__cache__subcmd__size_commands() {
    local commands; commands=()
    _describe -t commands 'prek cache size commands' commands "$@"
}
(( $+functions[_prek__subcmd__clean_commands] )) ||
_prek__subcmd__clean_commands() {
    local commands; commands=()
    _describe -t commands 'prek clean commands' commands "$@"
}
(( $+functions[_prek__subcmd__exec_commands] )) ||
_prek__subcmd__exec_commands() {
    local commands; commands=()
    _describe -t commands 'prek exec commands' commands "$@"
}
(( $+functions[_prek__subcmd__gc_commands] )) ||
_prek__subcmd__gc_commands() {
    local commands; commands=()
    _describe -t commands 'prek gc commands' commands "$@"
}
(( $+functions[_prek__subcmd__hook-impl_commands] )) ||
_prek__subcmd__hook-impl_commands() {
    local commands; commands=()
    _describe -t commands 'prek hook-impl commands' commands "$@"
}
(( $+functions[_prek__subcmd__init-template-dir_commands] )) ||
_prek__subcmd__init-template-dir_commands() {
    local commands; commands=()
    _describe -t commands 'prek init-template-dir commands' commands "$@"
}
(( $+functions[_prek__subcmd__install_commands] )) ||
_prek__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'prek install commands' commands "$@"
}
(( $+functions[_prek__subcmd__list_commands] )) ||
_prek__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'prek list commands' commands "$@"
}
(( $+functions[_prek__subcmd__prepare-hooks_commands] )) ||
_prek__subcmd__prepare-hooks_commands() {
    local commands; commands=()
    _describe -t commands 'prek prepare-hooks commands' commands "$@"
}
(( $+functions[_prek__subcmd__run_commands] )) ||
_prek__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'prek run commands' commands "$@"
}
(( $+functions[_prek__subcmd__sample-config_commands] )) ||
_prek__subcmd__sample-config_commands() {
    local commands; commands=()
    _describe -t commands 'prek sample-config commands' commands "$@"
}
(( $+functions[_prek__subcmd__self_commands] )) ||
_prek__subcmd__self_commands() {
    local commands; commands=(
'update:Update prek' \
    )
    _describe -t commands 'prek self commands' commands "$@"
}
(( $+functions[_prek__subcmd__self__subcmd__update_commands] )) ||
_prek__subcmd__self__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'prek self update commands' commands "$@"
}
(( $+functions[_prek__subcmd__try-repo_commands] )) ||
_prek__subcmd__try-repo_commands() {
    local commands; commands=()
    _describe -t commands 'prek try-repo commands' commands "$@"
}
(( $+functions[_prek__subcmd__uninstall_commands] )) ||
_prek__subcmd__uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'prek uninstall commands' commands "$@"
}
(( $+functions[_prek__subcmd__update_commands] )) ||
_prek__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'prek update commands' commands "$@"
}
(( $+functions[_prek__subcmd__util_commands] )) ||
_prek__subcmd__util_commands() {
    local commands; commands=(
'identify:Show file identification tags' \
'list-builtins:List all built-in hooks bundled with prek' \
'init-template-dir:Install Git shims in a directory intended for use with \`git config init.templateDir\`' \
'yaml-to-toml:Convert a YAML configuration file to prek.toml' \
'generate-shell-completion:Generate shell completion scripts' \
    )
    _describe -t commands 'prek util commands' commands "$@"
}
(( $+functions[_prek__subcmd__util__subcmd__generate-shell-completion_commands] )) ||
_prek__subcmd__util__subcmd__generate-shell-completion_commands() {
    local commands; commands=()
    _describe -t commands 'prek util generate-shell-completion commands' commands "$@"
}
(( $+functions[_prek__subcmd__util__subcmd__identify_commands] )) ||
_prek__subcmd__util__subcmd__identify_commands() {
    local commands; commands=()
    _describe -t commands 'prek util identify commands' commands "$@"
}
(( $+functions[_prek__subcmd__util__subcmd__init-template-dir_commands] )) ||
_prek__subcmd__util__subcmd__init-template-dir_commands() {
    local commands; commands=()
    _describe -t commands 'prek util init-template-dir commands' commands "$@"
}
(( $+functions[_prek__subcmd__util__subcmd__list-builtins_commands] )) ||
_prek__subcmd__util__subcmd__list-builtins_commands() {
    local commands; commands=()
    _describe -t commands 'prek util list-builtins commands' commands "$@"
}
(( $+functions[_prek__subcmd__util__subcmd__yaml-to-toml_commands] )) ||
_prek__subcmd__util__subcmd__yaml-to-toml_commands() {
    local commands; commands=()
    _describe -t commands 'prek util yaml-to-toml commands' commands "$@"
}
(( $+functions[_prek__subcmd__validate-config_commands] )) ||
_prek__subcmd__validate-config_commands() {
    local commands; commands=()
    _describe -t commands 'prek validate-config commands' commands "$@"
}
(( $+functions[_prek__subcmd__validate-manifest_commands] )) ||
_prek__subcmd__validate-manifest_commands() {
    local commands; commands=()
    _describe -t commands 'prek validate-manifest commands' commands "$@"
}

if [ "$funcstack[1]" = "_prek" ]; then
    _prek "$@"
else
    compdef _prek prek
fi
