diff options
| author | Jeff Carr <[email protected]> | 2025-10-17 17:18:38 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-17 17:18:38 -0500 |
| commit | 7cfeaaa25c46d87919b5a61dd2338765f40fc23c (patch) | |
| tree | 3b3d6cf7540bc3192ef686c737a01afb5a3321d3 /argv.go | |
| parent | 248f081df39436c234f38c3a1980365e2b4673c7 (diff) | |
lib now named 'argvpb'
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -11,7 +11,7 @@ package main import ( "os" - "go.wit.com/lib/gui/prep" + "go.wit.com/lib/protobuf/argvpb" "go.wit.com/log" ) @@ -30,10 +30,6 @@ type args struct { type EmptyCmd struct { } -func (args) Version() string { - return "gus " + VERSION + " Built on: " + BUILDTIME -} - func (a args) Description() string { return ` "Phantastic Gus" your network squirrel @@ -60,15 +56,21 @@ func init() { handles shell autocomplete */ +func (args) Version() string { + return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME) +} + func (args) Appname() string { return ARGNAME } -func (a args) DoAutoComplete(pb *prep.Auto) { +// 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", "--me", "gui", "--daemon"}) + base := []string{"--bash", "--me", "gui", "--daemon"} + pb.SendStrings(base) } else { - pb.SubCommand(pb.Argv...) + pb.SubCommand(pb.Goargs...) } os.Exit(0) } |
