Step 22: Shell completion docs for bash, zsh, fish.

Cobra provides built-in sgard completion subcommand — no additional
code needed. README updated with installation instructions for each
shell.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 11:10:28 -07:00
parent d2bba75365
commit c00d9c65c3
3 changed files with 20 additions and 4 deletions

View File

@@ -41,6 +41,21 @@ in your packages.
Binaries are also available on the
[releases page](https://github.com/kisom/sgard/releases).
### Shell completion
```sh
# Bash (add to ~/.bashrc)
source <(sgard completion bash)
# Zsh (add to ~/.zshrc)
source <(sgard completion zsh)
# Fish
sgard completion fish | source
# To load on startup:
sgard completion fish > ~/.config/fish/completions/sgard.fish
```
## Quick start
```sh