forked from toolshed/abra
refactor: autocomplete package
This commit is contained in:
@ -1,11 +1,8 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"github.com/sirupsen/logrus"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@ -29,17 +26,6 @@ Chas mode ("--chaos") will deploy your local checkout of a recipe as-is,
|
||||
including unstaged changes and can be useful for live hacking and testing new
|
||||
recipes.
|
||||
`,
|
||||
Action: internal.DeployAction,
|
||||
BashComplete: func(c *cli.Context) {
|
||||
appNames, err := config.GetAppNames()
|
||||
if err != nil {
|
||||
logrus.Warn(err)
|
||||
}
|
||||
if c.NArg() > 0 {
|
||||
return
|
||||
}
|
||||
for _, a := range appNames {
|
||||
fmt.Println(a)
|
||||
}
|
||||
},
|
||||
Action: internal.DeployAction,
|
||||
BashComplete: autocomplete.AppNameComplete,
|
||||
}
|
||||
|
Reference in New Issue
Block a user