completion
Print the shell completion script for the given shell (bash | zsh | fish | pwsh).
Prints the shell completion script for the given shell to stdout, so wiring up tab completion is a
single redirect into your shell config. Supported shells are bash, zsh, fish, and pwsh. With no
argument it detects the shell from the $SHELL basename and prints that script; if it cannot detect a
supported shell it prints short usage guidance and still exits 0. Passing an explicitly unsupported
shell is the one hard error — it lists the supported shells and exits 2.
Note that this command emits a raw shell script, not the usual JSON envelope, so always redirect it to
a file or append it to your shell config rather than reading it inline. If you would rather have the CLI
install the completion file for you, use simetrik doctor --install-completion <shell> instead.
See also: doctor, version. Requires CLI access. See permissions.
Arguments
shell(optional) — Shell to generate completion for. Detected from $SHELL when omitted.
Examples
simetrik completion zsh > ~/.simetrik/completion/_simetrik
simetrik completion bash >> ~/.bashrc
simetrik completionExit codes
| Code | Meaning |
|---|---|
0 | Completion script printed, or guidance shown when no shell could be detected |
2 | Usage error — an explicit unsupported shell was passed (supported: bash | zsh | fish | pwsh) |