summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-24 11:44:53 -0500
committerJeff Carr <[email protected]>2025-10-24 11:44:53 -0500
commit1fc75cd8934b220db3814710c0a79d549fcf827f (patch)
tree5b2e34783896532aaa3e84d09d0427fd0077efde
parent58519f14654cb2dd5d1b938bae5dbdaba5c04a1a (diff)
new argv.protov0.25.99
-rw-r--r--argv.custom.go2
-rw-r--r--main.go11
-rw-r--r--subCommand.go11
3 files changed, 9 insertions, 15 deletions
diff --git a/argv.custom.go b/argv.custom.go
index 127d9a5..855b458 100644
--- a/argv.custom.go
+++ b/argv.custom.go
@@ -91,7 +91,7 @@ func (a args) SendCompletionStrings(pb *argvpb.Argv) {
pb.SendStrings([]string{"once", "many", "mine", "favorites"})
os.Exit(0)
}
- if pb.Cmd == "" {
+ if pb.GetCmd() == "" {
// these are base autocomplete strings
matches := []string{"clean", "commit", "merge", "patch", "normal", "pull", "rebuild", "generate", "config"}
matches = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui", "whatchanged")
diff --git a/main.go b/main.go
index 8011e1e..3ae3c06 100644
--- a/main.go
+++ b/main.go
@@ -60,7 +60,7 @@ func main() {
// put things to do every time forge runs here
doCoreChecks()
- if me.argv.Cmd == "" {
+ if me.argv.GetCmd() == "" {
// no command line arguments were given
// do the default behavior and exit
s, err := doDefaultBehavior()
@@ -70,10 +70,15 @@ func main() {
me.argv.GoodExit(s)
}
- log.Info("Starting forge with subcommand:", me.argv.Cmd)
-
+ log.Info("Starting forge with subcommand:", me.argv.GetCmd())
s, err = doSubcommand()
+ // if the gui starts, it doesn't yet go to the end normally
+ if argv.Gui != nil {
+ me.myGui.Start() // loads the GUI toolkit
+ doGui() // start making our forge GUI
+ debug() // sits here forever
+ }
// safe exits back to your shell (with timing and toolkit close)
if err != nil {
me.argv.BadExit(s, err)
diff --git a/subCommand.go b/subCommand.go
index 69b3db1..7935d11 100644
--- a/subCommand.go
+++ b/subCommand.go
@@ -5,16 +5,12 @@ package main
import (
"go.wit.com/lib/gui/shell"
- "go.wit.com/log"
)
func doSubcommand() (string, error) {
var s string
var err error
- log.Info("Starting forge with subcommand:", me.argv.Cmd)
-
- //// start standard argv subcommand processing here ////
if argv.Dev != nil {
// first find the repos or gopaths to operate on
s, err = doDev()
@@ -95,13 +91,6 @@ func doSubcommand() (string, error) {
if argv.Verify != nil {
s, err = doVerify()
}
- //// end standard argv subcommand processing here ////
- // if the gui starts, it doesn't yet go to the end normally
- if argv.Gui != nil {
- me.myGui.Start() // loads the GUI toolkit
- doGui() // start making our forge GUI
- debug() // sits here forever
- }
return s, err
}