diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 55 |
1 files changed, 30 insertions, 25 deletions
@@ -19,25 +19,26 @@ import ( var argv args type args struct { - Clean *CleanCmd `arg:"subcommand:clean" help:"'git clean' + reset repos to original state"` - Commit *CommitCmd `arg:"subcommand:commit" help:"'git commit'"` - Gui *EmptyCmd `arg:"subcommand:gui" help:"open the gui"` - Merge *MergeCmd `arg:"subcommand:merge" help:"merge branches"` - Normal *ModeCmd `arg:"subcommand:normal" help:"shortcut to 'forge mode normal'"` - Mode *ModeCmd `arg:"subcommand:mode" help:"sets the mode (hacking, merging, publishing)"` - Patch *PatchCmd `arg:"subcommand:patch" help:"work with patchsets"` - Pull *PullCmd `arg:"subcommand:pull" help:"'git pull'"` - 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:"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"` + Clean *CleanCmd `arg:"subcommand:clean" help:"'git clean' + reset repos to original state"` + Commit *CommitCmd `arg:"subcommand:commit" help:"'git commit'"` + Gui *EmptyCmd `arg:"subcommand:gui" help:"open the gui"` + Merge *MergeCmd `arg:"subcommand:merge" help:"merge branches"` + Normal *ModeCmd `arg:"subcommand:normal" help:"shortcut to 'forge mode normal'"` + Mode *ModeCmd `arg:"subcommand:mode" help:"sets the mode (hacking, merging, publishing)"` + Patch *PatchCmd `arg:"subcommand:patch" help:"work with patchsets"` + Pull *PullCmd `arg:"subcommand:pull" help:"'git pull'"` + 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:"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"` + Generate *GenerateCmd `arg:"subcommand:generate" help:"helps run autogenpb in repos with .proto files"` + 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"` } type EmptyCmd struct { @@ -107,11 +108,15 @@ type CommitCmd struct { } type DevCmd struct { - Config *ConfigCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"` - Build *EmptyCmd `arg:"subcommand:build" help:"build this repo"` - Install *EmptyCmd `arg:"subcommand:install" help:"build & install this repo"` - Generate string `arg:"--generate" help:"run go generate"` - URL string `arg:"--connect" help:"forge url"` + Config *ConfigCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"` + Build *EmptyCmd `arg:"subcommand:build" help:"build this repo"` + Install *EmptyCmd `arg:"subcommand:install" help:"build & install this repo"` + URL string `arg:"--connect" help:"forge url"` +} + +type GenerateCmd struct { + Make *EmptyCmd `arg:"subcommand:make" help:"make all the autogenerated files"` + Clean *EmptyCmd `arg:"subcommand:clean" help:"clean out all the autogenerated files"` } type CleanCmd struct { @@ -243,7 +248,7 @@ func (args) Examples() string { func (a args) SendCompletionStrings(pb *argvpb.Argv) { if pb.Cmd == "" { // these are base autocomplete strings - matches := []string{"clean", "commit", "merge", "patch", "normal", "pull", "rebuild"} + matches := []string{"clean", "commit", "merge", "patch", "normal", "pull", "rebuild", "generate"} matches = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui", "whatchanged") matches = append(matches, "--version", "--force", "--all") pb.SendStrings(matches) |
