summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-17 16:29:12 -0500
committerJeff Carr <[email protected]>2025-10-17 16:29:12 -0500
commit006feab5a020ce63e5d3daea01bf496a9dcc16c4 (patch)
treebe671d6cfe934876866176d771844233bd9b6664
parentb5588034d45ad46642eef6dbd91c4ef5f463a7ff (diff)
moved argvpb to new location
-rw-r--r--argv.go19
-rw-r--r--main.go4
-rw-r--r--structs.go7
3 files changed, 15 insertions, 15 deletions
diff --git a/argv.go b/argv.go
index b5d51b4..375f50c 100644
--- a/argv.go
+++ b/argv.go
@@ -4,8 +4,7 @@ import (
"os"
"go.wit.com/gui"
- "go.wit.com/lib/fhelp"
- "go.wit.com/lib/gui/prep"
+ "go.wit.com/lib/protobuf/argvpb"
)
/*
@@ -52,10 +51,6 @@ This will pull down the go sources and
the repositories in the go.sum file using git clone`
}
-func (args) Version() string {
- return "guireleaser " + VERSION
-}
-
/*
handles shell autocomplete
*/
@@ -69,14 +64,20 @@ func (args) Buildtime() (string, string) {
}
func (args) ArgvGui() error {
- me.myGui = fhelp.Gui() // adds the GUI package argv support
+ // me.myGui = fhelp.Gui() // adds the GUI package argv support
me.origGui = gui.New()
return nil
}
-func (a args) DoAutoComplete(pb *prep.Auto) {
+func (args) Version() string {
+ return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME)
+}
+
+// sends the strings to bash or zsh that will be your options
+func (a args) SendCompletionStrings(pb *argvpb.Argv) {
if pb.Cmd == "" {
- pb.Autocomplete3([]string{"--bash", "quick", "--dry-run", "--full", "--reason", "--version", "--auto-run", "--keep-gomod"})
+ base := []string{"--bash", "quick", "--dry-run", "--full", "--reason", "--version", "--auto-run", "--keep-gomod"}
+ pb.SendStrings(base)
} else {
pb.SubCommand(pb.Goargs...)
}
diff --git a/main.go b/main.go
index 39fd0b2..b361009 100644
--- a/main.go
+++ b/main.go
@@ -10,8 +10,8 @@ import (
"go.wit.com/lib/fhelp"
"go.wit.com/lib/gadgets"
- "go.wit.com/lib/gui/prep"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/lib/protobuf/argvpb"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
@@ -29,7 +29,7 @@ var argv args
func main() {
me = new(autoType)
- me.sh = prep.Autocomplete(&argv) // adds shell auto complete to go-args
+ me.sh = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args
me.forge, _ = forgepb.Init()
me.found = new(gitpb.Repos)
diff --git a/structs.go b/structs.go
index 499de11..6cb0f0c 100644
--- a/structs.go
+++ b/structs.go
@@ -3,9 +3,8 @@ package main
import (
"go.wit.com/gui"
- "go.wit.com/lib/fhelp"
"go.wit.com/lib/gadgets"
- "go.wit.com/lib/gui/prep"
+ "go.wit.com/lib/protobuf/argvpb"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
)
@@ -13,8 +12,8 @@ import (
var me *autoType
type autoType struct {
- sh *prep.Auto // more experiments for bash handling
- myGui *fhelp.GuiPrep // the gui handle itself
+ sh *argvpb.Argv // shell autocomplete
+ myGui *argvpb.GuiPrep // the gui handle itself
origGui *gui.Node // the gui handle itself
releaseReasonS string // = "gocui dropdown select"
release releaseStruct // notsure