fix: initial subcmd completion

Broken by migration to v1 API.
This commit is contained in:
2022-01-20 11:42:04 +01:00
parent cff7534bf9
commit c7062e0494
2 changed files with 23 additions and 0 deletions

View File

@ -40,3 +40,24 @@ func RecipeNameComplete(c *cli.Context) {
fmt.Println(name)
}
}
// SubcommandComplete completes subcommands.
func SubcommandComplete(c *cli.Context) {
if c.NArg() > 0 {
return
}
subcmds := []string{
"app",
"autocomplete",
"catalogue",
"recipe",
"record",
"server",
"upgrade",
}
for _, cmd := range subcmds {
fmt.Println(cmd)
}
}