summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-17 22:36:11 -0500
committerJeff Carr <[email protected]>2025-09-17 22:36:11 -0500
commit62e8d457f104381c1bfeaef54761f2033da22cdd (patch)
treee5cf1f03b85e01c02ddd22a2679ab61a625c0a67 /argv.go
parentf936a17bc0a952bd543a65ab74e2370141cb618c (diff)
better command line handling
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/argv.go b/argv.go
index fb76877..f134f5f 100644
--- a/argv.go
+++ b/argv.go
@@ -161,14 +161,21 @@ forge -- a tool to manage lots of git repos. forge includes a GUI and TUI.
func DoAutoComplete(autoArgv *prep.Auto) {
// autoArgv.FastHelp()
dur := autoArgv.Duration.AsDuration()
- if dur < time.Millisecond*300 {
+ if dur < time.Millisecond*200 {
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))
autoArgv.AutoDebug()
+ fmt.Println(" ")
}
switch autoArgv.Cmd {
case "checkout":
+ if dur < time.Millisecond*200 {
+ // me.pp.WriteHelpForSubcommand(os.Stderr, "checkout")
+ autoArgv.Debugf("master: checkout the master branches on all repos")
+ autoArgv.Debugf("devel: checkout the devel branches on all repos")
+ autoArgv.Debugf("user: checkout the user branches on all repos")
+ }
// argv.Checkout.Autocomplete("devel master user")
autoArgv.Autocomplete(argv.Checkout, "devel master user")
case "clean":
@@ -178,7 +185,7 @@ func DoAutoComplete(autoArgv *prep.Auto) {
// me.pp.WriteHelpForSubcommand(os.Stderr, "clean")
fmt.Println("--force verify --repo")
case "commit":
- fmt.Println("--all")
+ autoArgv.Autocomplete(argv.Commit, "--all")
case "config":
fmt.Println("add fix list")
case "dirty":