diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -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) } |
