Supporting auto complete and a build-release script
Some checks failed
CI / Test (Linux) (push) Has been cancelled
CI / Test (Windows MSVC) (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (push) Has been cancelled

This commit is contained in:
Eric Ratliff
2026-02-22 08:22:22 -06:00
parent fe5df7dc6d
commit ba402cc187
5 changed files with 133 additions and 2 deletions

View File

@@ -290,6 +290,31 @@ constructor injection -- the simplest form of dependency inversion.
| `anvil board --remove NAME` | Remove a board profile |
| `anvil board --default NAME` | Set the default board |
| `anvil refresh [--force] [--file P] [--ignore P] [--unignore P]` | Update project infrastructure |
| `anvil completions SHELL` | Generate tab-completion script (bash, zsh, fish, powershell) |
---
## Tab Completion
Anvil can generate shell completion scripts so that pressing Tab completes
commands, flags, and arguments:
```bash
# Bash (add to ~/.bashrc)
eval "$(anvil completions bash)"
# Zsh (add to ~/.zshrc)
eval "$(anvil completions zsh)"
# Fish
anvil completions fish > ~/.config/fish/completions/anvil.fish
# PowerShell (add to $PROFILE)
anvil completions powershell | Out-String | Invoke-Expression
```
After setup, `anvil ref<Tab>` completes to `anvil refresh`, and
`anvil pin --<Tab>` shows all available flags.
---