diff options
Diffstat (limited to 'sendStrings.go')
| -rw-r--r-- | sendStrings.go | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/sendStrings.go b/sendStrings.go index 2fe1977..78b7a6c 100644 --- a/sendStrings.go +++ b/sendStrings.go @@ -8,7 +8,6 @@ import ( "fmt" "os" "strings" - "time" "go.wit.com/log" ) @@ -30,25 +29,29 @@ func (pb *Auto) SendString(sendthis string) { // the application must send an array []string{"help", "run", "list"} func (pb *Auto) SendStrings(parts []string) { - dur := pb.Duration.AsDuration() - if dur < time.Millisecond*200 { - pb.Debug = true - /* - pb.Debugf("TODO: show extended help here '%s' '%s' %v dur=%v\n", pb.Arg0, pb.Arg1, pb.Argv, config.FormatDuration(dur)) - pb.PrintDebug() - fmt.Println(" ") - */ - if myAuto.pp == nil { - pb.Debugf("myAuto.pp == nil") - } else { - pb.Debugf("myAuto.pp != nil") - if pb.Cmd == "" { - myAuto.pp.WriteHelp(os.Stderr) + /* + dur := pb.Duration.AsDuration() + if dur < time.Millisecond*200 { + pb.Debug = true + // pb.Debugf("TODO: show extended help here '%s' '%s' %v dur=%v\n", pb.Arg0, pb.Arg1, pb.Argv, config.FormatDuration(dur)) + // pb.PrintDebug() + // fmt.Println(" ") + if myAuto.pp == nil { + pb.Debugf("myAuto.pp == nil") } else { - myAuto.pp.WriteHelpForSubcommand(os.Stderr, pb.Cmd) + pb.Debugf("myAuto.pp != nil") + if pb.Fast { + // this means the user is pressing tab. no longer doing stderr + } else { + if pb.Cmd == "" { + myAuto.pp.WriteHelp(os.Stderr) + } else { + myAuto.pp.WriteHelpForSubcommand(os.Stderr, pb.Cmd) + } + } } } - } + */ // parts := strings.Split(sendthis, " ") var all []string |
