Skip to main content

signaloid-cli completion

Generate shell tab-completion scripts.

Synopsis

signaloid-cli completion <bash|zsh|fish>

Description

Generates a shell completion script for the specified shell. Write the script to your shell's completion directory to enable tab-completion for all Signaloid CLI commands and options.

Use > to write the script to a dedicated completion file or >> to append it to your shell profile. We recommend writing to a dedicated completion file, so that you can run the command again following an upgrade to the Signaloid CLI version to update the completions.

Usage

# Bash
signaloid-cli completion bash > /etc/bash_completion.d/signaloid-cli
source /etc/bash_completion.d/signaloid-cli

# Zsh
signaloid-cli completion zsh > /usr/local/share/zsh/site-functions/_signaloid-cli
# Add /usr/local/share/zsh/site-functions to fpath in ~/.zshrc

# Fish
signaloid-cli completion fish > ~/.config/fish/completions/signaloid-cli.fish

After installing, reload your shell profile or start a new terminal session for tab-completion to take effect.

Examples

Install Bash completion:

signaloid-cli completion bash > /etc/bash_completion.d/signaloid-cli
source /etc/bash_completion.d/signaloid-cli

Install Zsh completion:

signaloid-cli completion zsh > /usr/local/share/zsh/site-functions/_signaloid-cli
# Then ensure the directory is on your fpath by adding this to ~/.zshrc:
# fpath=(/usr/local/share/zsh/site-functions $fpath)

Install Fish completion:

signaloid-cli completion fish > ~/.config/fish/completions/signaloid-cli.fish

Preview the generated script without installing:

signaloid-cli completion zsh

Each generated script starts with its own install instructions in the header. For example, the Zsh script begins with:

#compdef signaloid-cli

# Zsh completion for signaloid-cli
# To install:
# signaloid-cli completion zsh > /usr/local/share/zsh/site-functions/_signaloid-cli
# Add /usr/local/share/zsh/site-functions to fpath in ~/.zshrc

See Also