diff options
| author | Jeff Carr <[email protected]> | 2025-10-17 16:29:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-17 16:29:12 -0500 |
| commit | 006feab5a020ce63e5d3daea01bf496a9dcc16c4 (patch) | |
| tree | be671d6cfe934876866176d771844233bd9b6664 | |
| parent | b5588034d45ad46642eef6dbd91c4ef5f463a7ff (diff) | |
moved argvpb to new location
| -rw-r--r-- | argv.go | 19 | ||||
| -rw-r--r-- | main.go | 4 | ||||
| -rw-r--r-- | structs.go | 7 |
3 files changed, 15 insertions, 15 deletions
@@ -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...) } @@ -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) @@ -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 |
