diff options
| author | Jeff Carr <[email protected]> | 2025-09-17 22:36:11 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-17 22:36:11 -0500 |
| commit | 62e8d457f104381c1bfeaef54761f2033da22cdd (patch) | |
| tree | e5cf1f03b85e01c02ddd22a2679ab61a625c0a67 /argv.go | |
| parent | f936a17bc0a952bd543a65ab74e2370141cb618c (diff) | |
better command line handling
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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": |
