Problem
aegisctl has a growing list of subcommands (pending, approve, deny, verify, evidence, simulate, why, diff-policy, manifest, supply-chain, policy-pack, test-action, plugin). Typing them without tab completion is a drag.
Acceptance criteria
Files to touch
cmd/aegisctl/completion.go (new)
cmd/aegisctl/main.go (wire the new subcommand)
cmd/aegisctl/completion_test.go (new)
- Optional:
docs/aegisctl-completion.md for installation instructions
How to test locally
./bin/aegisctl completion bash > /tmp/aegisctl-completion.bash
source /tmp/aegisctl-completion.bash
# Now type "aegisctl " and press TAB
Notes
No need to use a fancy library for this. A hand-written bash function is fine for a project this size. Look at how gh, kubectl, or docker handle their completion scripts for inspiration.
Problem
aegisctlhas a growing list of subcommands (pending,approve,deny,verify,evidence,simulate,why,diff-policy,manifest,supply-chain,policy-pack,test-action,plugin). Typing them without tab completion is a drag.Acceptance criteria
aegisctl completion bashprints a bash completion script to stdoutaegisctl completion zshprints a zsh completion script to stdoutstarter-kit/QUICKSTART_PR_WRITER.mdor a newdocs/aegisctl-completion.mdFiles to touch
cmd/aegisctl/completion.go(new)cmd/aegisctl/main.go(wire the new subcommand)cmd/aegisctl/completion_test.go(new)docs/aegisctl-completion.mdfor installation instructionsHow to test locally
Notes
No need to use a fancy library for this. A hand-written bash function is fine for a project this size. Look at how
gh,kubectl, ordockerhandle their completion scripts for inspiration.