summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-17 16:29:45 -0500
committerJeff Carr <[email protected]>2025-10-17 16:29:45 -0500
commite4f3c02a6f97810aa69a85e81a994c12b33a8ca8 (patch)
tree51141336fda0e0a9e65ad13abb3594b64643c80e /argv.go
parentc9e79a11c7caeabc8a6f7b2d2217a3af80c4797c (diff)
renamed lib to argvpb
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/argv.go b/argv.go
index ac5e3eb..6d9e4ba 100644
--- a/argv.go
+++ b/argv.go
@@ -11,7 +11,7 @@ package main
import (
"os"
- "go.wit.com/lib/gui/prep"
+ "go.wit.com/lib/protobuf/argvpb"
)
var argv args
@@ -37,10 +37,6 @@ type args struct {
type EmptyCmd struct {
}
-func (args) Version() string {
- return ARGNAME + " " + VERSION + " Built on " + BUILDTIME
-}
-
/*
handles shell autocomplete
*/
@@ -53,9 +49,15 @@ func (args) Buildtime() (string, string) {
return BUILDTIME, VERSION
}
-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{"drives", "gui", "--version"})
+ base := []string{"drives", "gui", "--version"}
+ pb.SendStrings(base)
} else {
pb.SubCommand(pb.Goargs...)
}