summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go19
1 files changed, 10 insertions, 9 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...)
}