prek list description says "List available hooks" — but it lists configured hooks, not available ones
The issue
The list subcommand's help text reads:
$ prek list -h
List available hooks
This is misleading. prek list does not list hooks that are available to use — it lists hooks that are currently configured in the project's .pre-commit-config.yaml. "Available" implies a catalog of all possible hooks (especially builtins), when the actual behavior is scoped to the current config.
How this causes confusion
- User runs
prek list in Project A, which has a local hook named no-commit-to-main
- Output shows
.:no-commit-to-main — reads like an "available" hook
- User uses
id: no-commit-to-main under repo: builtin in Project B
prek run fails: unknown builtin hook id "no-commit-to-main"
The user reasonably assumed prek list was showing hooks they could use anywhere, because the help text says "available."
Suggestion
Change the help text from:
/// List available hooks.
to something like:
/// List hooks configured in the current project.
This is a one-line change in crates/prek/src/cli/mod.rs (line 215).
prek listdescription says "List available hooks" — but it lists configured hooks, not available onesThe issue
The
listsubcommand's help text reads:This is misleading.
prek listdoes not list hooks that are available to use — it lists hooks that are currently configured in the project's.pre-commit-config.yaml. "Available" implies a catalog of all possible hooks (especially builtins), when the actual behavior is scoped to the current config.How this causes confusion
prek listin Project A, which has a local hook namedno-commit-to-main.:no-commit-to-main— reads like an "available" hookid: no-commit-to-mainunderrepo: builtinin Project Bprek runfails:unknown builtin hook id "no-commit-to-main"The user reasonably assumed
prek listwas showing hooks they could use anywhere, because the help text says "available."Suggestion
Change the help text from:
to something like:
This is a one-line change in
crates/prek/src/cli/mod.rs(line 215).