diff options
| -rw-r--r-- | argv.go | 41 | ||||
| -rw-r--r-- | main.go | 11 |
2 files changed, 32 insertions, 20 deletions
@@ -19,25 +19,26 @@ import ( var argv args type args struct { - Checkout *CheckoutCmd `arg:"subcommand:checkout" help:"'git checkout'"` - 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"` - 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"` + Checkout *CheckoutCmd `arg:"subcommand:checkout" help:"'git checkout'"` + 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."` + 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 { @@ -237,7 +238,7 @@ 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 = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui") + matches = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui", "whatchanged") matches = append(matches, "--version", "--force", "--all", "--forge-rebuild") pb.SendStrings(matches) } else { @@ -9,6 +9,7 @@ import ( "embed" "go.wit.com/lib/gui/prep" + "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/log" ) @@ -121,6 +122,16 @@ func main() { if argv.Patch != nil { s, err = doPatch() } + + if argv.Whatchanged != nil { + // this might be deprecated by the git devs + // I put it here because of finger memory and it's nice + // for command line completion + r := shell.RunRealtime([]string{"bash", "-c", "git log"}) + s = "git whatchanged is now: todo" + err = r.Error + } + if argv.BuildForge { // attempts to download all the sources // and binaries needed to build forge |
