diff options
| author | Jeff Carr <[email protected]> | 2025-10-12 01:33:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-12 01:33:48 -0500 |
| commit | 35482563e5fc3491254120dd2f4faa778bfadfff (patch) | |
| tree | 28479d279b89a82f78629182321f5a930967a3c8 /argv.go | |
| parent | 0c2423043d2ba9979dca951a61473925edd2def6 (diff) | |
try new names
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -209,11 +209,14 @@ func (args) Examples() string { return out } -func (a args) DoAutoComplete(pb *prep.Auto) { +// sends the strings to bash or zsh that will be your options +func (a args) SendCompletionStrings(pb *prep.Auto) { if pb.Cmd == "" { - pb.Autocomplete3([]string{"checkout", "clean", "commit", "gui", "merge", "mode", "patch", "pull", "show", "add", "fixer", "--version", "--force", "dev", "normal", "--all"}) + // these are base autocomplete strings + pb.SendStrings([]string{"checkout", "clean", "commit", "gui", "merge", "mode", "patch", "pull", "show", "add", "fixer", "--version", "--force", "dev", "normal", "--all"}) } else { - pb.SubCommand(pb.Goargs...) + // autogenerate the strings for the subcommand using github.com/alexflint/go-arg + pb.GenerateSubCommandStrings(pb.Goargs...) } os.Exit(0) } |
