summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 17:44:34 -0500
committerJeff Carr <[email protected]>2025-10-15 17:44:34 -0500
commit2daf0189f628f7214cdc9295f898c355636ef9a3 (patch)
tree7d956822723be6e7add3c04275c87da8d9af85f4 /argv.go
parent0487c7b6d0d7631818100a4767ecf35c7462c0b7 (diff)
better name & bash autocomplete works
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/argv.go b/argv.go
index 3f15f7d..770bfa6 100644
--- a/argv.go
+++ b/argv.go
@@ -34,11 +34,11 @@ type args struct {
Fixer *FixCmd `arg:"subcommand:fixer" help:"send in the fixer"`
Verify *VerifyCmd `arg:"subcommand:verify" help:"populate stats"`
Whatchanged *EmptyCmd `arg:"subcommand:whatchanged" help:"being deprecated (perhaps?). this is just for finger memory."`
+ Rebuild *RebuildCmd `arg:"subcommand:rebuild" help:"download all the forge sources and rebuild forge"`
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"`
Fix bool `arg:"--fix" help:"try to make repairs"`
- BuildForge bool `arg:"--forge-rebuild" help:"download all the forge sources and rebuild forge"`
}
type EmptyCmd struct {
@@ -55,6 +55,12 @@ type ShowCmd struct {
Tag *TagCmd `arg:"subcommand:tag" help:"show git tags"`
}
+type RebuildCmd struct {
+ Forge *EmptyCmd `arg:"subcommand:forge" help:"rebuild forge"`
+ GoClone *EmptyCmd `arg:"subcommand:go-clone" help:"rebuild go-clone"`
+ Autogenpb *EmptyCmd `arg:"subcommand:autogenpb" help:"rebuild autogenpb"`
+}
+
type FixCmd struct {
Porcelain *EmptyCmd `arg:"subcommand:porcelain" help:"git status --porcelain"`
Urls bool `arg:"--urls" help:"check for changes in repo urls"`
@@ -237,9 +243,9 @@ func (args) Examples() string {
func (a args) SendCompletionStrings(pb *prep.Auto) {
if pb.Cmd == "" {
// these are base autocomplete strings
- matches := []string{"checkout", "clean", "commit", "merge", "patch", "normal", "pull"}
+ matches := []string{"checkout", "clean", "commit", "merge", "patch", "normal", "pull", "rebuild"}
matches = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui", "whatchanged")
- matches = append(matches, "--version", "--force", "--all", "--forge-rebuild")
+ matches = append(matches, "--version", "--force", "--all")
pb.SendStrings(matches)
} else {
// autogenerate the strings for the subcommand using github.com/alexflint/go-arg