summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/argv.go b/argv.go
index dd84d38..b9e1356 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"
"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)
}