summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/argv.go b/argv.go
index adadd09..b5f15c5 100644
--- a/argv.go
+++ b/argv.go
@@ -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":