summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-25 02:30:52 -0500
committerJeff Carr <[email protected]>2025-09-25 02:30:52 -0500
commit5e8fab62dc79d50e1d4b447db9f6a70bcd14da42 (patch)
treef2b44ad9937394b0822ccb1dba8724ef3d4816f7 /argv.go
parent144a0cf158c341c81896fbd0f50380381636659b (diff)
new argv bash completionv0.0.24v0.0.23v0.0.22v0.0.21
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go23
1 files changed, 11 insertions, 12 deletions
diff --git a/argv.go b/argv.go
index 5af91c9..29c3ec0 100644
--- a/argv.go
+++ b/argv.go
@@ -4,8 +4,9 @@
package main
import (
- "fmt"
"os"
+
+ "go.wit.com/lib/gui/prep"
)
/*
@@ -58,17 +59,15 @@ regex -- interact with Googles' Gemini AI
handles shell autocomplete
*/
-func (a args) DoAutoComplete(argv []string) {
- switch argv[0] {
- case "playback":
- fmt.Println("long --uuid purge last submit")
- case "clean":
- fmt.Println("")
- default:
- if argv[0] == ARGNAME {
- // list the subcommands here
- fmt.Println("--json interact playback clean")
- }
+func (args) Appname() string {
+ return ARGNAME
+}
+
+func (a args) DoAutoComplete(pb *prep.Auto) {
+ if pb.Cmd == "" {
+ pb.Autocomplete3([]string{"--bash", "interact", "playback", "clean"})
+ } else {
+ pb.SubCommand(pb.Argv...)
}
os.Exit(0)
}