Description
Prints a shell completion script for the grit subcommands and flags in the running binary. Redirect stdout to a file your shell loads, or evaluate it in the current session during setup.
Supported shells: bash, elvish, fish, powershell, and zsh (whatever clap_complete exposes for the installed grit version).
The script always matches the CLI you built or installed. After grit update, regenerate completions so new commands and flags appear.
Release archives also ship pre-generated scripts under completions/ when you install from a tarball.
Options
| Argument | Meaning |
|---|---|
<shell> |
One of bash, elvish, fish, powershell, or zsh. |
grit completions rejects the global --json and --markdown flags; stdout is always the raw completion script.
JSON output
There is no JSON form. --json and --markdown exit with an error; use the human completion script only.
Markdown output
None. --markdown is rejected for the same reason as --json.