diff options
| author | Jeff Carr <[email protected]> | 2025-10-17 11:44:39 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-17 11:44:39 -0500 |
| commit | 923ab262f624bd50c543062c4f3f2db9e577d5fb (patch) | |
| tree | 0a028b65e2800a291e44ec7c1c945aa30f111897 /argv.go | |
| parent | 0be9867c3193033977951e853445464fb9e4596a (diff) | |
Finally renamed prep to argvpb
I think this will be the final resting palce for
this part of the shell autocomplete. At least I
hope so.
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -6,7 +6,7 @@ package main import ( "os" - "go.wit.com/lib/gui/prep" + "go.wit.com/lib/protobuf/argvpb" ) /* @@ -54,10 +54,6 @@ Example usage: ` } -func (args) Version() string { - return "go.wit.com/apps/autogenpb " + VERSION + " Built on " + BUILDTIME -} - /* handles shell autocomplete */ @@ -74,9 +70,15 @@ func (args) Buildtime() (string, string) { return BUILDTIME, VERSION } -func (a args) DoAutoComplete(pb *prep.Auto) { +func (args) Version() string { + return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME) +} + +// sends the strings to bash or zsh that will be your options +func (a args) SendCompletionStrings(pb *argvpb.Argv) { if pb.Cmd == "" { - pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--renumber", "--reformat", "--delete", "--dry-run"}) + base := []string{"--bash", "--proto", "--regret", "--debug", "--renumber", "--reformat", "--delete", "--dry-run"} + pb.SendStrings(base) } else { pb.SubCommand(pb.Goargs...) } |
