diff options
| author | Jeff Carr <[email protected]> | 2025-10-17 15:42:34 -0500 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-17 15:42:34 -0500 | 
| commit | 7abc658c20a143bef36e30ad34719776bbc7a505 (patch) | |
| tree | e76b57af6a7b37c9d7ce59985e9db0587e4c1cf3 | |
| parent | d4efbe0b4d3baeb908a70fe7e832fc3dd6f6d92b (diff) | |
new argv location
| -rw-r--r-- | argv.go | 16 | ||||
| -rw-r--r-- | main.go | 4 | ||||
| -rw-r--r-- | structs.go | 4 | 
3 files changed, 13 insertions, 11 deletions
@@ -3,7 +3,7 @@ package main  import (  	"os" -	"go.wit.com/lib/gui/prep" +	"go.wit.com/lib/protobuf/argvpb"  )  /* @@ -33,10 +33,6 @@ func (args) Examples() string {  	return out  } -func (args) Version() string { -	return "go-clone " + VERSION + "    Built on " + BUILDTIME -} -  type EmptyCmd struct {  } @@ -60,9 +56,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{"dump", "gui", "show", "--version", "--keep-files", "--buildversion"}) +		base := []string{"dump", "gui", "show", "--version", "--keep-files", "--buildversion"} +		pb.SendStrings(base)  	} else {  		pb.SubCommand(pb.Goargs...)  	} @@ -7,7 +7,7 @@ import (  	"time"  	"go.wit.com/lib/debian" -	"go.wit.com/lib/gui/prep" +	"go.wit.com/lib/protobuf/argvpb"  	"go.wit.com/lib/protobuf/gitpb"  	"go.wit.com/lib/protobuf/zoopb"  	"go.wit.com/log" @@ -25,7 +25,7 @@ var argv args  func main() {  	me = new(mainType) -	me.sh = prep.Autocomplete(&argv) // adds shell auto complete to go-args +	me.sh = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args  	me.pb = new(zoopb.Package)  	wd, err := os.Getwd() @@ -4,7 +4,7 @@ import (  	"go.wit.com/gui"  	"go.wit.com/lib/fhelp"  	"go.wit.com/lib/gadgets" -	"go.wit.com/lib/gui/prep" +	"go.wit.com/lib/protobuf/argvpb"  	"go.wit.com/lib/protobuf/gitpb"  	"go.wit.com/lib/protobuf/zoopb"  ) @@ -13,7 +13,7 @@ var me *mainType  // this app's variables  type mainType struct { -	sh      *prep.Auto     // more experiments for bash handling +	sh      *argvpb.Argv   // shell autocomplete  	myGui   *fhelp.GuiPrep // the gui handle itself  	origGui *gui.Node      // the gui handle itself  	pb      *zoopb.Package // the .deb package protobuf  | 
