unifi completion
About 245 words
Print the shell completion script.
Usage
unifi completion <bash|zsh|fish|powershell>Print the shell completion script for unifi.
Completion covers commands and flags, and also the things they name: contexts, sites, clients, devices, ports and themes are completed live from your configuration and controller.
Bash (needs the bash-completion package):
# this session
source <(unifi completion bash)
# every session, Linux
unifi completion bash > /etc/bash_completion.d/unifi
# every session, macOS with Homebrew
unifi completion bash > "$(brew --prefix)/etc/bash_completion.d/unifi"Zsh (needs autoload -U compinit; compinit in ~/.zshrc):
# this session
source <(unifi completion zsh)
# every session
unifi completion zsh > "${fpath[1]}/_unifi"Fish:
# this session
unifi completion fish | source
# every session
unifi completion fish > ~/.config/fish/completions/unifi.fishPowerShell:
# this session
unifi completion powershell | Out-String | Invoke-Expression
# every session
unifi completion powershell >> $PROFILEStart a new shell after installing the script for every session.
Examples
source <(unifi completion zsh)
unifi completion bash > /etc/bash_completion.d/unifi
unifi completion fish > ~/.config/fish/completions/unifi.fish
unifi completion powershell >> $PROFILEGlobal flags
These flags are accepted by every command.
| Flag | Description |
|---|---|
--color-scheme <string> | color scheme: auto, dark or light |
--context <string> | context to use instead of the current one |
--no-cache | ask the controller for everything instead of using cached answers |
-o, --output <string> | output format: text, wide, json, yaml (table is another name for text) |
-s, --site <string> | site to act on instead of the context's default site |
--theme <string> | theme to render with instead of the configured one |
