diff options
| author | Jeff Carr <[email protected]> | 2025-10-19 06:31:12 -0500 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-19 06:31:12 -0500 | 
| commit | ce698610b7617bf44f3c639676511c4eb7590000 (patch) | |
| tree | 258e72a8346fd707483993d3094d2f98020b2cec | |
| parent | 7b268437f40ffd15fe659b3662d984910a6faefe (diff) | |
new argvv0.0.36
| -rw-r--r-- | argv.custom.go | 16 | ||||
| -rw-r--r-- | argv.template.go | 8 | 
2 files changed, 7 insertions, 17 deletions
diff --git a/argv.custom.go b/argv.custom.go index 9665275..18af43b 100644 --- a/argv.custom.go +++ b/argv.custom.go @@ -25,22 +25,6 @@ and with the right geometries. TODO: restore the bash working paths  	`  } -/* -	handles shell autocomplete -*/ - -func (args) Appname() string { -	return APPNAME -} - -func (args) Buildtime() (string, string) { -	return BUILDTIME, VERSION -} - -func (args) Version() string { -	return argvpb.StandardVersion(APPNAME, VERSION, BUILDTIME) -} -  // sends the strings to bash or zsh that will be your options  func (a args) SendCompletionStrings(pb *argvpb.Argv) {  	if pb.Cmd == "" { diff --git a/argv.template.go b/argv.template.go index d438b20..e7a9948 100644 --- a/argv.template.go +++ b/argv.template.go @@ -31,6 +31,12 @@ func (args) ParseFlags(flags []string) error {  	return err  } +// add this funcgion: this will print the help +func (args) WriteHelpForSubcommand(cmd string) error { +	me.pp.WriteHelpForSubcommand(os.Stderr, cmd) +	return nil +} +  // this will print the help for the subcmd  func (args) WriteHelpForAutocomplete(part string, subcmd ...string) error {  	return me.pp.WriteHelpForAutocomplete(os.Stderr, os.Stdout, part, subcmd...) @@ -57,7 +63,7 @@ func (args) InitGui() error {  func (args) Exit() {  	gui.UnloadToolkits() -	if argv.Verbose { +	if me.argv.Verbose() {  		log.Info("argv.Exit() called", APPNAME+".Exit()")  	}  	// remove this from the template for your app (or make one for youself if you need it)  | 
