summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
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 c90d486..9d04352 100644
--- a/argv.go
+++ b/argv.go
@@ -6,7 +6,7 @@ package main
import (
"os"
- "go.wit.com/lib/gui/prep"
+ "go.wit.com/lib/protobuf/argvpb"
)
/*
@@ -54,10 +54,6 @@ Example usage:
`
}
-func (args) Version() string {
- return "go.wit.com/apps/autogenpb " + VERSION + " Built on " + BUILDTIME
-}
-
/*
handles shell autocomplete
*/
@@ -74,9 +70,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{"--bash", "--proto", "--regret", "--debug", "--renumber", "--reformat", "--delete", "--dry-run"})
+ base := []string{"--bash", "--proto", "--regret", "--debug", "--renumber", "--reformat", "--delete", "--dry-run"}
+ pb.SendStrings(base)
} else {
pb.SubCommand(pb.Goargs...)
}