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 /argv.go | |
| parent | b5588034d45ad46642eef6dbd91c4ef5f463a7ff (diff) | |
moved argvpb to new location
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 19 |
1 files changed, 10 insertions, 9 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...) } |
