feat(terraform): add terraform-docs completion (#14185)

Generate completions from the installed terraform-docs CLI in the background and preserve a valid cache when generation fails or returns no output.

Fixes #12138

AI-assisted with OpenAI Codex.
This commit is contained in:
Abdullah Ahmed authored and GitHub committed 2026-11-27 19:01:52 -08:00
1 parent 801782e8a6
commit 90f9fbc532
2 files changed
+28

No files matched your search

+8
View File
@@ -12,6 +12,14 @@ plugins=(... terraform)
## Requirements
- [Terraform](https://terraform.io/)
- [terraform-docs](https://terraform-docs.io/) (optional, for completion)
## terraform-docs completion
If `terraform-docs` is installed, this plugin also enables its completion.
The completion script is generated from the installed version and cached in
`$ZSH_CACHE_DIR/completions/_terraform-docs`. It is refreshed in the background
each time the plugin loads, so completion stays in sync with the installed CLI.
## Aliases