summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-14 22:00:12 -0500
committerJeff Carr <[email protected]>2025-10-14 22:00:12 -0500
commit90c62819d72fbd7fd68b7caed2ed60050ea4b71e (patch)
tree3173ae48aaa998be46ca14def9a7accdfb2744ca /argv.go
parent3c6e0574f9a984a3ab35ff7a27ad35ff7c3e9edc (diff)
make a doStats()
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/argv.go b/argv.go
index 7cfbc7b..9ee7460 100644
--- a/argv.go
+++ b/argv.go
@@ -31,7 +31,8 @@ type args struct {
Show *ShowCmd `arg:"subcommand:show" help:"print out things"`
Dev *DevCmd `arg:"subcommand:dev" help:"features under development"`
Add *EmptyCmd `arg:"subcommand:add" help:"Scan directores for git repos"`
- Fixer *FixCmd `arg:"subcommand:fixer" help:"like in the movie"`
+ Fixer *FixCmd `arg:"subcommand:fixer" help:"send in the fixer"`
+ Verify *VerifyCmd `arg:"subcommand:verify" help:"populate stats"`
All bool `arg:"--all" help:"whatever you are doing, do it all over"`
Force bool `arg:"--force" help:"try to strong-arm things"`
Verbose bool `arg:"--verbose" help:"show more output than usual"`
@@ -60,6 +61,11 @@ type FixCmd struct {
Prune bool `arg:"--prune" help:"'git fetch --prune' everywhere"`
}
+type VerifyCmd struct {
+ List bool `arg:"--list" help:"list all stats"`
+ All bool `arg:"--all" help:"do all repos"`
+}
+
func (ShowCmd) Examples() string {
return "forge show dirty\nforge show repos --all"
}
@@ -230,7 +236,10 @@ func (args) Examples() string {
func (a args) SendCompletionStrings(pb *prep.Auto) {
if pb.Cmd == "" {
// these are base autocomplete strings
- pb.SendStrings([]string{"checkout", "clean", "commit", "gui", "merge", "mode", "patch", "pull", "show", "add", "fixer", "--version", "--force", "dev", "normal", "--all"})
+ matches := []string{"checkout", "clean", "commit", "merge", "patch", "normal", "pull"}
+ matches = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui")
+ matches = append(matches, "--version", "--force", "--all")
+ pb.SendStrings(matches)
} else {
// autogenerate the strings for the subcommand using github.com/alexflint/go-arg
pb.GenerateSubCommandStrings(pb.Goargs...)