diff options
| -rw-r--r-- | argv.go | 4 | ||||
| -rw-r--r-- | complete.go | 52 | ||||
| -rw-r--r-- | defaultBehavior.go | 4 | ||||
| -rw-r--r-- | doMerge.go | 2 | ||||
| -rw-r--r-- | subCommand.go | 8 |
5 files changed, 35 insertions, 35 deletions
@@ -25,7 +25,7 @@ type args struct { 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."` + Whatchanged *EmptyCmd `arg:"subcommand:whatchanged" ` 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"` @@ -144,7 +144,7 @@ type TagCmd struct { } type MergeCmd struct { - All bool `arg:"--all" help:"merge all"` + All bool `arg:"--all" help:"merge all user branches to devel and master"` Devel *EmptyCmd `arg:"subcommand:devel" help:"merge user to devel"` Master *EmptyCmd `arg:"subcommand:master" help:"merge devel to master"` Publish *EmptyCmd `arg:"subcommand:publish" help:"increment versions and publish master branch"` diff --git a/complete.go b/complete.go index 3832308..ba6ca77 100644 --- a/complete.go +++ b/complete.go @@ -91,34 +91,36 @@ func (args) Examples() string { // sends the strings to bash or zsh that will be your options func (a args) DoAutoComplete() error { var err error - if me.pp == nil { - me.pp, err = arg.ParseFlagsArgv(&argv) - if err != nil { - fmt.Fprintf(argvpb.Stddbg, "returned from parseFlagsArgv(%v)\n", err) - } + me.pp, err = arg.ParseFlagsArgv(&argv) + if err != nil { + fmt.Fprintf(argvpb.Stddbg, "go-args parseFlagsArgv(%v) finished autocomplete\n", err) + // counter intuitive. return nil on err for now + return nil } - if argvpb.PB.HelpCounter > 3 { - argvpb.SetDebug(true) - argvpb.PB.HelpCounter = 0 - if argvpb.Len() == 0 { - fmt.Fprintf(argvpb.Stddbg, "len(PB.Real)=(%d)\n", len(argvpb.PB.Real)) - me.pp.WriteHelp(argvpb.Stderr) - fmt.Fprintf(argvpb.Stddbg, "WriteHelp() (%v)\n", "fricking got here") - fmt.Fprintf(argvpb.Stddbg, "WriteHelp() (%v)\n", "fricking got here") - fmt.Fprintf(argvpb.Stddbg, "WriteHelp() (%v)\n", "fricking got here") + /* + if argvpb.PB.HelpCounter > 3 { + argvpb.SetDebug(true) + argvpb.PB.HelpCounter = 0 + if argvpb.Len() == 0 { + fmt.Fprintf(argvpb.Stddbg, "len(PB.Real)=(%d)\n", len(argvpb.PB.Real)) + me.pp.WriteHelp(argvpb.Stderr) + fmt.Fprintf(argvpb.Stddbg, "WriteHelp() (%v)\n", "fricking got here") + fmt.Fprintf(argvpb.Stddbg, "WriteHelp() (%v)\n", "fricking got here") + fmt.Fprintf(argvpb.Stddbg, "WriteHelp() (%v)\n", "fricking got here") + return nil + } else { + fmt.Fprintf(argvpb.Stddbg, "WriteHelp() damnit len(%v) (%v)\n", len(argvpb.PB.Real), argvpb.PB.Real) + fmt.Fprintf(argvpb.Stddbg, "WriteHelp() damnit len(%v) (%v)\n", len(argvpb.PB.Real), argvpb.PB.Real) + fmt.Fprintf(argvpb.Stddbg, "WriteHelp() damnit len(%v) (%v)\n", len(argvpb.PB.Real), argvpb.PB.Real) + } + err = me.pp.WriteHelpForAutocomplete("", argvpb.PB.Real...) + if err != nil { + fmt.Fprintf(argvpb.Stddbg, "returned from WriteHelpForAutocomplete() pb.Real(%v)\n", argvpb.PB.Real) + fmt.Fprintf(argvpb.Stddbg, "returned from WriteHelpForAutocomplete(%v)\n", err) + } return nil - } else { - fmt.Fprintf(argvpb.Stddbg, "WriteHelp() damnit len(%v) (%v)\n", len(argvpb.PB.Real), argvpb.PB.Real) - fmt.Fprintf(argvpb.Stddbg, "WriteHelp() damnit len(%v) (%v)\n", len(argvpb.PB.Real), argvpb.PB.Real) - fmt.Fprintf(argvpb.Stddbg, "WriteHelp() damnit len(%v) (%v)\n", len(argvpb.PB.Real), argvpb.PB.Real) } - err = me.pp.WriteHelpForAutocomplete("", argvpb.PB.Real...) - if err != nil { - fmt.Fprintf(argvpb.Stddbg, "returned from WriteHelpForAutocomplete() pb.Real(%v)\n", argvpb.PB.Real) - fmt.Fprintf(argvpb.Stddbg, "returned from WriteHelpForAutocomplete(%v)\n", err) - } - return nil - } + */ if argvpb.PB.IsMatch("cache") { matches, _ := matchCacheFiles() fmt.Fprintf(argvpb.Stdout, "%s", matches) diff --git a/defaultBehavior.go b/defaultBehavior.go index e7d3c52..f404ddc 100644 --- a/defaultBehavior.go +++ b/defaultBehavior.go @@ -23,13 +23,13 @@ func doDefaultBehavior() (string, error) { // got to the end with nothing to do (?) found := findWorkRepos() if found.Len() == 0 { - return "you have no repos with patches (list them all with --show)", nil + return "you have no repos with patches (list them all with 'show')", nil } found.SortNamespace() // footer := fmt.Sprintf("findWorkRepos() found %d", found.Len()) // return "doDefaultBehavior() :" + footer, nil footer := me.forge.PrintDefaultTB(found) - return "repos with unsaved changes: (list them all with --show) " + footer, nil + return "repos with unsaved changes: (list them all with 'show') " + footer, nil } if me.forge.IsModeMaster() { @@ -58,7 +58,7 @@ func doMerge() (string, error) { } found := findWorkRepos() if found.Len() == 0 { - return "There does't seem to be anything to merge. Show your repos with --show", nil + return "There does't seem to be anything to merge. Show your repos with 'show'", nil } found.SortNamespace() footer := me.forge.PrintDefaultTB(found) diff --git a/subCommand.go b/subCommand.go index ce17401..0a051d2 100644 --- a/subCommand.go +++ b/subCommand.go @@ -74,12 +74,10 @@ func doSubcommand() (string, error) { } 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"}) + // might be deprecated by the git devs // switch to git log then + // shell.Exec([]string{"bash", "-c", "-i", "git log"}) + shell.Exec([]string{"bash", "-c", "-i", "git whatchanged"}) s = "git whatchanged is now: todo" - err = r.Error } if argv.Rebuild != nil { |
