diff options
| author | Jeff Carr <[email protected]> | 2025-09-25 05:03:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-25 05:03:12 -0500 |
| commit | 2d5506b5fafd6eea6401ab3b253820c528882574 (patch) | |
| tree | 4fe7bba9a9f5f9af57fdcb4945d9e5b0f0b964a4 /argv.go | |
| parent | fabf425958a25bc3b83104aad25cad8adbe31a89 (diff) | |
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -3,6 +3,12 @@ package main +import ( + "os" + + "go.wit.com/lib/gui/prep" +) + /* this parses the command line arguements @@ -48,3 +54,20 @@ Example usage: func (args) Version() string { return "go.wit.com/apps/autogenpb " + VERSION + " Built on " + BUILDTIME } + +/* + handles shell autocomplete +*/ + +func (args) Appname() string { + return ARGNAME +} + +func (a args) DoAutoComplete(pb *prep.Auto) { + if pb.Cmd == "" { + pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--delete", "--dry-run"}) + } else { + pb.SubCommand(pb.Argv...) + } + os.Exit(0) +} |
