diff options
| author | Jeff Carr <[email protected]> | 2025-09-21 23:22:53 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-21 23:22:53 -0500 |
| commit | 1dbf1a561b092658416e1a3b0c59ba6b057bad07 (patch) | |
| tree | 0b3f847cc908775cc5a54b53b0ed8260dbabdffb /bash.orig.go | |
| parent | 3c096fec0f341f88fa614ef72b05a849e59a3cf3 (diff) | |
Diffstat (limited to 'bash.orig.go')
| -rw-r--r-- | bash.orig.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bash.orig.go b/bash.orig.go index b539c79..77b7e56 100644 --- a/bash.orig.go +++ b/bash.orig.go @@ -26,13 +26,15 @@ type ArgsBash struct { // try this struct out (?) var myAuto *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) - appName string // a good way to track the name of the binary ? - pp *arg.Parser // for parsing the command line args. Yay to alexf lint! - autoFunc func(*Auto) + id int // should be unique + hidden bool // don't update the toolkits when it's hidden + Auto func([]string) // the function for shell autocomplete + appName string // a good way to track the name of the binary ? + pp *arg.Parser // for parsing the command line args. Yay to alexf lint! + autoFunc func(*Auto) // also a function for autocomplete + match map[string]string // maps for strings } // argname is the name of the executable @@ -60,7 +62,6 @@ func Bash(argname string, autocomplete func([]string)) *AutoArgs { func (pb *Auto) PrintDebug() { dur := pb.Duration.AsDuration() pb.Debugf("AUTOCOMPLETE: arg0='%s' arg1='%s' partial='%s' cmd='%s' age=%s argv=%v\n", pb.Arg0, pb.Arg1, pb.Partial, pb.Cmd, shell.FormatDuration(dur), pb.Argv) - // fmt.Println("--all --gui --verbose --force") } // returns the last command (is blank if the current arg is not blank) |
