Skip to Content
CLIReferenceShell completion

cmdop completion

cmdop completion writes a completion script to standard output. Redirect it into the location your shell reads, then open a new shell.

cmdop completion [bash|zsh|fish|powershell]

The generated script must match the installed binary. Regenerate it after a CLI upgrade when new commands or flags do not appear in your shell. Completion only helps command entry; it does not configure authentication, relays, or agent startup.

Bash

On Linux:

cmdop completion bash > /etc/bash_completion.d/cmdop

On macOS with Homebrew:

cmdop completion bash > $(brew --prefix)/etc/bash_completion.d/cmdop

Zsh

If completion is not already enabled, add this to ~/.zshrc first:

autoload -Uz compinit && compinit

Then write the script:

cmdop completion zsh > "${fpath[1]}/_cmdop"

With Oh My Zsh:

cmdop completion zsh > ~/.oh-my-zsh/completions/_cmdop

If the shell still cannot complete cmdop, check that the completion directory is loaded before the command is requested. Most completion issues are shell startup order problems, not Cmdop account or relay problems.

Fish

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

PowerShell

For the current session:

cmdop completion powershell | Out-String | Invoke-Expression

To load it in every session, append it to your profile:

cmdop completion powershell >> $PROFILE
Last updated on