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

12
vendor/modules.txt vendored
View File

@@ -66,9 +66,6 @@ github.com/davecgh/go-spew/spew
## explicit; go 1.13
github.com/dlclark/regexp2
github.com/dlclark/regexp2/syntax
# github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
## explicit
github.com/docopt/docopt-go
# github.com/emirpasic/gods v1.18.1
## explicit; go 1.2
github.com/emirpasic/gods/containers
@@ -142,6 +139,9 @@ github.com/go-git/go-git/v5/utils/trace
# github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8
## explicit; go 1.20
github.com/golang/groupcache/lru
# github.com/inconshreveable/mousetrap v1.1.0
## explicit; go 1.18
github.com/inconshreveable/mousetrap
# github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
## explicit
github.com/jbenet/go-context/io
@@ -168,6 +168,12 @@ github.com/sergi/go-diff/diffmatchpatch
# github.com/skeema/knownhosts v1.3.2
## explicit; go 1.24.0
github.com/skeema/knownhosts
# github.com/spf13/cobra v1.10.2
## explicit; go 1.15
github.com/spf13/cobra
# github.com/spf13/pflag v1.0.9
## explicit; go 1.12
github.com/spf13/pflag
# github.com/xanzy/ssh-agent v0.3.3
## explicit; go 1.16
github.com/xanzy/ssh-agent