something to debug if under 400ms
This commit is contained in:
parent
b8252f5caa
commit
9bc6d030e5
10
argv.go
10
argv.go
|
@ -6,8 +6,10 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"go.wit.com/lib/gui/prep"
|
"go.wit.com/lib/gui/prep"
|
||||||
|
"go.wit.com/lib/gui/shell"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -155,9 +157,13 @@ forge -- a tool to manage lots of git repos. forge includes a GUI and TUI.
|
||||||
|
|
||||||
// arg0 should be the last entry
|
// arg0 should be the last entry
|
||||||
// arg1 should be the 'current' thing the user is typing
|
// arg1 should be the 'current' thing the user is typing
|
||||||
// it should be '' if the user doesn't have a partial string to match
|
// it should be empty if the user doesn't have a partial string to match
|
||||||
func DoAutoComplete(autoArgv *prep.Auto) {
|
func DoAutoComplete(autoArgv *prep.Auto) {
|
||||||
fmt.Fprintf(os.Stderr, "stuff --gui --all '%s' '%s' %v\n", autoArgv.Arg0, autoArgv.Arg1, autoArgv.Argv)
|
dur := autoArgv.Duration.AsDuration()
|
||||||
|
if dur < time.Millisecond*300 {
|
||||||
|
autoArgv.Debug = true
|
||||||
|
autoArgv.Debugf("TODO: show extended help here '%s' '%s' %v dur=%v\n", autoArgv.Arg0, autoArgv.Arg1, autoArgv.Argv, shell.FormatDuration(dur))
|
||||||
|
}
|
||||||
|
|
||||||
switch autoArgv.Argv[0] {
|
switch autoArgv.Argv[0] {
|
||||||
case "checkout":
|
case "checkout":
|
||||||
|
|
Loading…
Reference in New Issue