better command line handling
This commit is contained in:
parent
f936a17bc0
commit
62e8d457f1
11
argv.go
11
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":
|
||||
|
|
Loading…
Reference in New Issue