diff options
| author | Jeff Carr <[email protected]> | 2025-09-25 01:09:41 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-25 01:09:41 -0500 |
| commit | 5e60e8d76d84e8c58cc070102fb4fd8848159a24 (patch) | |
| tree | 40a9a31e3a7fdf80112f72cfb576ad426c455cf4 /argv.go | |
| parent | 8b199273e8b1c65a3f49deccb41521c28dc0225a (diff) | |
new autocomplete
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1,8 +1,9 @@ package main import ( - "fmt" "os" + + "go.wit.com/lib/gui/prep" ) /* @@ -37,6 +38,7 @@ Examples: ` } +/* func (a args) DoAutoComplete(argv []string) { switch argv[0] { case "checkout": @@ -51,3 +53,19 @@ func (a args) DoAutoComplete(argv []string) { } os.Exit(0) } +*/ + +func (args) Appname() string { + return ARGNAME +} + +func (a args) DoAutoComplete(pb *prep.Auto) { + // fmt.Fprintf(os.Stderr, "blah\n") + // fmt.Fprintf(os.Stderr, "\n") + if pb.Cmd == "" { + pb.Autocomplete3([]string{"--dry-run", "--recursive", "--work"}) + } else { + pb.SubCommand(pb.Argv...) + } + os.Exit(0) +} |
