From 006feab5a020ce63e5d3daea01bf496a9dcc16c4 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 17 Oct 2025 16:29:12 -0500 Subject: moved argvpb to new location --- argv.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'argv.go') 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...) } -- cgit v1.2.3