summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-16 12:13:45 -0500
committerJeff Carr <[email protected]>2025-10-16 12:13:45 -0500
commit28839452b290b83d409193044c5737a92cc1ec3e (patch)
tree9cc108b3f80463b67209cb12f4e044d6990d70d9 /structs.go
parent58083f07bc5b3dc3c93843110746c32492022a12 (diff)
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/structs.go b/structs.go
index 31b7cc4..2594094 100644
--- a/structs.go
+++ b/structs.go
@@ -18,21 +18,26 @@ 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
+}
+
// try this struct out (?)
var me *AutoArgs
// this is a work in progress
type AutoArgs struct {
- id int // should be unique
- hidden bool // don't update the toolkits when it's hidden
- Auto func([]string) // the function for shell autocomplete
+ id int // should be unique
+ // hidden bool // don't update the toolkits when it's hidden
+ Auto func([]string) // the function for shell autocomplete
examples func() string // some examples
appExit func() // app Exit()
buildtime func() (string, string) // some examples
- pp *arg.Parser // for parsing the command line args. Yay to alexf lint!
autoFunc func(*Auto) // also a function for autocomplete
guiFunc func() error // enables Gui functions
err error // store any errors from argv
+ pp *arg.Parser // for parsing the command line args. Yay to alexf lint!
pb *Auto
ARGNAME string // a good way to track the name of the binary ?
@@ -53,8 +58,3 @@ func GetLast(cur string, argv []string) string {
}
return ""
}
-
-// returns the name of the executable registered for shell autocomplete
-func AppName() string {
- return me.ARGNAME
-}