pluggy completions
Print a shell completion script to stdout. Install it into your shell’s completion directory to get tab completion for commands and flags.
Usage
pluggy completions <shell>Supported shells:
bashzshfishpwsh
Any other value errors: Unknown shell "<value>". Supported: bash, zsh, fish, pwsh.
Installation
bash
pluggy completions bash > /usr/local/etc/bash_completion.d/pluggyOn Linux, /etc/bash_completion.d/pluggy is more common. Restart the shell or source the file.
zsh
pluggy completions zsh > "${fpath[1]}/_pluggy"${fpath[1]} is the first directory on your $fpath. Common choices are /usr/local/share/zsh/site-functions and ~/.zsh/completions. Rebuild the completion cache with rm ~/.zcompdump; autoload -U compinit && compinit.
fish
pluggy completions fish > ~/.config/fish/completions/pluggy.fishfish auto-discovers the new file on next shell start.
PowerShell
pluggy completions pwsh >> $PROFILE$PROFILE is the path to your PowerShell profile (for example $HOME\Documents\PowerShell\Profile.ps1). The script uses Register-ArgumentCompleter -Native.
What each script provides
- Top-level subcommand names (and their aliases) on first-word completion.
- Per-command flag completion on second-word and later.
- Global flags (
-v,--verbose,-p,--project,--json,--no-color) everywhere.
Completions are generated by walking the live commander tree at runtime, so they always match the binary’s actual flags. Bump pluggy, regenerate the completion script, and the list is current.
JSON mode
--json on pluggy completions doesn’t change anything. The output is a shell script either way. There’s no JSON envelope.
See also
pluggy --help: the same information in human form.