From 28839452b290b83d409193044c5737a92cc1ec3e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 16 Oct 2025 12:13:45 -0500 Subject: hmm --- structs.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'structs.go') 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 -} -- cgit v1.2.3