diff options
| author | Jeff Carr <[email protected]> | 2025-10-19 05:11:04 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-19 05:11:04 -0500 |
| commit | 9836434ac9ac1313e5fd3ce4675fbf6dac4421e2 (patch) | |
| tree | 52e98e39ecbf8e43fe2f95a362a2d8fddea78383 /argv.custom.go | |
| parent | 8afd9b6bb91050f954625dbf5819672f02781d4b (diff) | |
new argvv0.23.146
Diffstat (limited to 'argv.custom.go')
| -rw-r--r-- | argv.custom.go | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/argv.custom.go b/argv.custom.go new file mode 100644 index 0000000..569f516 --- /dev/null +++ b/argv.custom.go @@ -0,0 +1,43 @@ +package main + +import ( + "os" + + "go.wit.com/gui" + "go.wit.com/lib/protobuf/argvpb" +) + +var VERSION string +var BUILDTIME string + +var APPNAME string = "guireleaser" + +func (a args) Description() string { + return ` +Example usage: + guireleaser go.wit.com/apps/go-clone --increment --release --dry-run --reason "blerg" + +This will pull down the go sources and +the repositories in the go.sum file using git clone` +} + +/* + handles shell autocomplete +*/ + +func (args) ArgvGui() error { + // me.myGui = fhelp.Gui() // adds the GUI package argv support + me.gui = gui.New() + return nil +} + +// sends the strings to bash or zsh that will be your options +func (a args) SendCompletionStrings(pb *argvpb.Argv) { + if pb.Cmd == "" { + base := []string{"--bash", "quick", "--dry-run", "--full", "--reason", "--version", "--auto-run", "--keep-gomod"} + pb.SendStrings(base) + } else { + pb.SubCommand(pb.Goargs...) + } + os.Exit(0) +} |
