completion
CLI reference for the apothem completion command.
Print a shell-completion script for the requested shell to stdout. Enabling completion is opt-in: this command only prints the script — it never edits your shell startup files. You append the output to the shell's completion file yourself.
Synopsis
apothem completion bash|zsh|fish|powershellThe emitted script enables <TAB> completion of apothem subcommands, flags,
and — for the --harness option — the registered harness ids plus all.
Supported shells
| Shell | How the script is produced |
|---|---|
bash | Click's native bash completion script. |
zsh | Click's native zsh completion script. |
fish | Click's native fish completion script. |
powershell | A Register-ArgumentCompleter script generated by the PowerShell completion class Apothem registers with Click (Click ships none natively), driving the same completion protocol as the other shells. |
Requesting any other shell exits 64 with the supported-shell list.
Enabling completion per shell
The apothem command must be on your PATH first. The one-shot installers
write an apothem shim into $HOME/.local/bin (POSIX) or
%LOCALAPPDATA%\Microsoft\WindowsApps (Windows) and never edit your PATH, so
add that directory if it is not already listed. Then enable completion by
appending the script to the shell's completion file and restarting the shell:
# bash — append to your bashrc
apothem completion bash >> ~/.bashrc
# zsh — append to your zshrc
apothem completion zsh >> ~/.zshrc
# fish — write to the fish completions directory
apothem completion fish > ~/.config/fish/completions/apothem.fish# PowerShell — append the completer registration to your profile
apothem completion powershell >> $PROFILETo try completion for the current session only without editing any file, source
the script directly (bash/zsh): source <(apothem completion bash).
Why it is opt-in
Apothem never silently edits an operator's shell startup files. The installers print a one-line hint pointing at this command; the operator decides whether to enable completion and which file to append to. This keeps the install footprint predictable and reversible — removing the appended block disables completion.
Options
| Option | Description |
|---|---|
SHELL | One of bash, zsh, fish, powershell (required positional argument). |
-h, --help | Show help and exit. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Completion script emitted |
| 64 | Unsupported shell requested, or another usage error such as an unknown option. completion has no --json mode: it prints a script, and passing --json is itself a usage error. |
See also
- apothem install — install a harness configuration
- apothem harnesses — the harness ids
--harnesscompletion offers - CLI reference — all subcommands