diff options
| author | Jeff Carr <[email protected]> | 2025-10-17 16:29:45 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-17 16:29:45 -0500 |
| commit | e4f3c02a6f97810aa69a85e81a994c12b33a8ca8 (patch) | |
| tree | 51141336fda0e0a9e65ad13abb3594b64643c80e /argv.go | |
| parent | c9e79a11c7caeabc8a6f7b2d2217a3af80c4797c (diff) | |
renamed lib to argvpb
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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...) } |
