summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/argv.go b/argv.go
index 0cb2c9b..8542fe5 100644
--- a/argv.go
+++ b/argv.go
@@ -3,6 +3,12 @@
package main
+import (
+ "os"
+
+ "go.wit.com/lib/gui/prep"
+)
+
/*
this parses the command line arguements
@@ -48,3 +54,20 @@ Example usage:
func (args) Version() string {
return "go.wit.com/apps/autogenpb " + VERSION + " Built on " + BUILDTIME
}
+
+/*
+ handles shell autocomplete
+*/
+
+func (args) Appname() string {
+ return ARGNAME
+}
+
+func (a args) DoAutoComplete(pb *prep.Auto) {
+ if pb.Cmd == "" {
+ pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--delete", "--dry-run"})
+ } else {
+ pb.SubCommand(pb.Argv...)
+ }
+ os.Exit(0)
+}