Skip to Content

cmdop completion

Generate shell completion scripts. Tab-complete cmdop subcommands, flags, hostnames, and skill names.

cmdop completion bash cmdop completion zsh cmdop completion fish cmdop completion powershell

The command writes the script to stdout — pipe it into your shell’s completion directory or source it directly.

Install for bash

# Per-user cmdop completion bash > ~/.local/share/bash-completion/completions/cmdop # System-wide (requires sudo) sudo cmdop completion bash > /etc/bash_completion.d/cmdop

Reload your shell or source the file once.

Install for zsh

# Make sure compinit runs in your ~/.zshrc: # autoload -Uz compinit && compinit # Drop the completion in $fpath mkdir -p ~/.zsh/completions cmdop completion zsh > ~/.zsh/completions/_cmdop # Add to ~/.zshrc: # fpath=(~/.zsh/completions $fpath)

Restart the shell.

Install for fish

cmdop completion fish > ~/.config/fish/completions/cmdop.fish

Fish picks it up automatically on next prompt.

Install for PowerShell

cmdop completion powershell | Out-String | Invoke-Expression # To persist, add the above line to your PowerShell profile: notepad $PROFILE

What gets completed

  • All subcommands and nested subcommands.
  • Flags and their values where statically known (--mode dev|prod, --log-level debug|info|warn|error).
  • Hostnames from cmdop machines (when daemon is running).
  • Skill names from cmdop skills list.
  • Issue IDs (CMD-N) on cmdop issue show <TAB>.
  • Session IDs on cmdop session attach <TAB>.

Disabling dynamic completion

Dynamic completions (hostnames, skills, issues) require the daemon to be reachable. If it’s not, completion falls back to the static command tree. To force-disable dynamic lookups (e.g., for offline environments):

cmdop config set completion.dynamic false

Updating after a cmdop upgrade

After cmdop update apply, regenerate completions to pick up new commands and flags:

cmdop completion bash > ~/.local/share/bash-completion/completions/cmdop exec $SHELL
Last updated on