Skip to content
Apothem
CLI reference

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|powershell

The emitted script enables <TAB> completion of apothem subcommands, flags, and — for the --harness option — the registered harness ids plus all.

Supported shells

ShellHow the script is produced
bashClick's native bash completion script.
zshClick's native zsh completion script.
fishClick's native fish completion script.
powershellA 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 >> $PROFILE

To 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

OptionDescription
SHELLOne of bash, zsh, fish, powershell (required positional argument).
-h, --helpShow help and exit.

Exit codes

CodeMeaning
0Completion script emitted
64Unsupported 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

On this page