Shell Completions#
InfraGuard provides tab completion for all commands, subcommands, and options.
Generate Completion Script#
infraguard completions bash # Bash
infraguard completions zsh # Zsh
infraguard completions fish # FishIf you omit the shell argument, the CLI auto-detects from the SHELL environment variable (defaults to bash).
Installation#
Bash#
# Current session
eval "$(infraguard completions bash)"
# Permanent
infraguard completions bash > ~/.local/share/bash-completion/completions/infraguardZsh#
# Current session
eval "$(infraguard completions zsh)"
# Permanent (add ~/.zfunc to fpath in .zshrc first)
infraguard completions zsh > ~/.zfunc/_infraguardMake sure your .zshrc includes:
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinitFish#
infraguard completions fish > ~/.config/fish/completions/infraguard.fishFish picks up completion files from ~/.config/fish/completions/ automatically.
What Gets Completed#
- Top-level commands:
run,dashboard,config,token,api,profile,deploy,rotate,completions - Subcommands:
config show,config set,config domain add,deploy run,deploy destroy, etc. - Options and flags:
--config,--provider,--engine,--domain,--ssh-key, etc. - Choice values:
--providercompletes todo,aws,azure,hetzner,cloudflare;--enginecompletes toterraform,pulumi