Completions for CLI
Author: lewisacidicCreated Aug 15, 2019Updated Jun 30, 2023
Labelsfeature
Following up on #1118, it would be great to have cross-shell completions for the CLI.
These could be statically autogenerated from the output of --help options.
Would be great to have
- cross-shell completions (bash, zsh, fish, powershell)
- help introspection where supported i.e.
pre-commit i<TAB>
install (Install the pre-commit script) install-hooks (Install hook environments...)- complete for installed hooks (i.e.
pre-commit run check-<TAB>
check-added-large-files (Prevent giant files from being committed.)
check-ast (Simply check whether the files parse as valid python.)
check-toml (This hook checks toml files for parseable syntax.)- a command line option to install the completions (i.e.
pre-commit install-completions --shell zsh).
Source: pre-commit/pre-commit