summaryrefslogtreecommitdiff
path: root/argv.custom.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-19 05:24:23 -0500
committerJeff Carr <[email protected]>2025-10-19 05:24:23 -0500
commit4a544d613c256bcd3b865e98fb5abbcbf8c15672 (patch)
tree190868b5ea215e16b729b6d140ac8c68d186c1df /argv.custom.go
parent11995fd3b1902125db16fb4bce7ab9561d75ad7b (diff)
newer but still not right argvv0.0.64
Diffstat (limited to 'argv.custom.go')
-rw-r--r--argv.custom.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/argv.custom.go b/argv.custom.go
new file mode 100644
index 0000000..948b90d
--- /dev/null
+++ b/argv.custom.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+ "os"
+
+ "go.wit.com/lib/protobuf/argvpb"
+)
+
+// are sent via -ldflags at buildtime
+var VERSION string
+var BUILDTIME string
+var APPNAME string = "forged"
+
+// sends the strings to bash or zsh that will be your options
+func (a args) SendCompletionStrings(pb *argvpb.Argv) {
+ if pb.Cmd == "" {
+ base := []string{"--bash", "repos", "gui", "patches", "--daemon", "missing"}
+ pb.SendStrings(base)
+ } else {
+ pb.SubCommand(pb.Goargs...)
+ }
+ os.Exit(0)
+}