summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
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)
}