summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-25 02:40:24 -0500
committerJeff Carr <[email protected]>2025-09-25 02:40:24 -0500
commit89c9b46f8b06c882dbc60d2cdf4c19b50397acbc (patch)
tree1a7213fff73f0d9b7fcef82bc24be7348a66b745 /argv.go
parent8ab09243500576460a9e5b12cae0b997933d6577 (diff)
new argv bash completionv0.0.38v0.0.37v0.0.36v0.0.35v0.0.34
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go22
1 files changed, 10 insertions, 12 deletions
diff --git a/argv.go b/argv.go
index deffbb2..dd84d38 100644
--- a/argv.go
+++ b/argv.go
@@ -9,9 +9,9 @@ package main
*/
import (
- "fmt"
"os"
+ "go.wit.com/lib/gui/prep"
"go.wit.com/log"
)
@@ -60,17 +60,15 @@ func init() {
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", "--me", "gui", "--daemon"})
+ } else {
+ pb.SubCommand(pb.Argv...)
}
os.Exit(0)
}