something to debug if under 400ms

This commit is contained in:
Jeff Carr 2025-09-17 20:54:52 -05:00
parent b8252f5caa
commit 9bc6d030e5
1 changed files with 8 additions and 2 deletions

10
argv.go
View File

@ -6,8 +6,10 @@ package main
import (
"fmt"
"os"
"time"
"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
// 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) {
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] {
case "checkout":