/pre-commit-tab-completion

Shell tab completion scripts for pre-commit.

MIT LicenseMIT

pre-commit-tab-completion

⚠️ I do not work on this anymore. Use instead https://github.com/mdeweerd/pre-commit-completion


Shell tab completion scripts for pre-commit.

To-do:
  • Files completion (e.g. when using pre-commit run --files).

How to use

Select a required file (zsh, bash, tcsh) and copy its content somewhere your shell looks for completions.
For example, for zsh (ohmyzsh) I use /usr/local/share/zsh/site-functions/_pre-commit.

Restart a shell.

You can find more examples in the shtab documentation.

Alternatives

Not an alternative for tab completion, but pre-commit plugin adds aliases for common commands of pre-commit.

Why is this not in the official pre-commit repository?

An open issue since 2019: pre-commit/pre-commit#1119