summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--notsure.go18
-rw-r--r--theMagicOfAutocomplete.go8
2 files changed, 18 insertions, 8 deletions
diff --git a/notsure.go b/notsure.go
new file mode 100644
index 0000000..f61b9c5
--- /dev/null
+++ b/notsure.go
@@ -0,0 +1,18 @@
+package argvpb
+
+// these are things I'm not sure about doing
+// or haven't figured out what to do with
+// or are generally part of idiocracy
+
+// this is sill in development
+// figure out how to trigger this
+var argBash ArgsBash
+
+type ArgsBash struct {
+ Bash bool `arg:"--bash" help:"generate bash completion"`
+}
+
+// returns the name of the executable registered for shell autocomplete
+func AppName() string {
+ return me.ARGNAME
+}
diff --git a/theMagicOfAutocomplete.go b/theMagicOfAutocomplete.go
index 902f1ea..a5516d2 100644
--- a/theMagicOfAutocomplete.go
+++ b/theMagicOfAutocomplete.go
@@ -15,14 +15,6 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
-// this is sill in development
-// figure out how to trigger this
-var argBash ArgsBash
-
-type ArgsBash struct {
- Bash bool `arg:"--bash" help:"generate bash completion"`
-}
-
func Autocomplete(dest any) *Argv {
me = new(AutoArgs) // todo: redo this
findAppInfo(dest) // parses back to main() for argv info