feat: migrate from docopt to cobra for CLI argument parsing

Replace docopt-go with spf13/cobra, giving cheat a built-in
`--completion` flag that dynamically generates shell completions for
bash, zsh, fish, and powershell. This replaces the manually-maintained
static completion scripts and resolves the root cause of multiple
completion issues (#768, #705, #633, #632, #476).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christopher Allen Lane
2026-02-15 17:33:47 -05:00
parent ca1ec0e38d
commit 9b92261604
119 changed files with 14204 additions and 3127 deletions

View File

@@ -8,7 +8,7 @@ Accepted
## Context
In `cmd/cheat/main.go` lines 47-52, the code parses environment variables assuming they all contain an equals sign:
In the `envVars()` function in `cmd/cheat/main.go`, the code parses environment variables assuming they all contain an equals sign:
```go
for _, e := range os.Environ() {

View File

@@ -100,5 +100,5 @@ The parallelization attempt was valuable as a learning exercise and definitively
## References
- Benchmark implementation: cmd/cheat/search_bench_test.go
- Benchmark implementation: test/integration/search_bench_test.go
- Reverted parallel implementation: see git history (commit 82eb918)