diff options
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) +} |
