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:
@@ -7,7 +7,7 @@ ARCHITECTURE.md for design details.
|
||||
|
||||
## Current Status
|
||||
|
||||
**Phase:** Phase 4 in progress. Step 21 complete, ready for Step 22.
|
||||
**Phase:** Phase 4 in progress. Steps 21–22 complete, ready for Step 23.
|
||||
|
||||
**Last updated:** 2026-03-24
|
||||
|
||||
@@ -42,7 +42,7 @@ ARCHITECTURE.md for design details.
|
||||
|
||||
## Up Next
|
||||
|
||||
Step 22: Shell Completion.
|
||||
Step 23: TLS Transport for sgardd.
|
||||
|
||||
## Known Issues / Decisions Deferred
|
||||
|
||||
@@ -85,3 +85,4 @@ Step 22: Shell Completion.
|
||||
| 2026-03-24 | — | Locked files + dir-only entries. v2.0.0 released. |
|
||||
| 2026-03-24 | — | Phase 4 planned (Steps 21–27): lock/unlock, shell completion, TLS, DEK rotation, real FIDO2, test cleanup. |
|
||||
| 2026-03-24 | 21 | Lock/unlock toggle commands. garden/lock.go, cmd/sgard/lock.go, 6 tests. |
|
||||
| 2026-03-24 | 22 | Shell completion: cobra built-in, README docs for bash/zsh/fish. |
|
||||
|
||||
@@ -232,8 +232,8 @@ Depends on Steps 17, 18.
|
||||
|
||||
### Step 22: Shell Completion
|
||||
|
||||
- [ ] `cmd/sgard/completion.go`: cobra's built-in completion for bash, zsh, fish
|
||||
- [ ] Update README with completion installation instructions
|
||||
- [x] Cobra provides built-in `sgard completion` for bash, zsh, fish, powershell — no code needed
|
||||
- [x] README updated with shell completion installation instructions
|
||||
|
||||
### Step 23: TLS Transport for sgardd
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user