forked from toolshed/abra
feat: auto-complete app and recipe names
This commit is contained in:
@ -78,6 +78,18 @@ var appNewCommand = &cli.Command{
|
||||
},
|
||||
ArgsUsage: "<recipe>",
|
||||
Action: action,
|
||||
BashComplete: func(c *cli.Context) {
|
||||
catl, err := catalogue.ReadRecipeCatalogue()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if c.NArg() > 0 {
|
||||
return
|
||||
}
|
||||
for name, _ := range catl {
|
||||
fmt.Println(name)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// getRecipeMeta retrieves the recipe metadata from the recipe catalogue.
|
||||
|
Reference in New Issue
Block a user