0
0
forked from toolshed/abra

refactor: autocomplete package

This commit is contained in:
2021-12-12 00:17:39 +01:00
parent 32dcddb631
commit ae6adace50
20 changed files with 83 additions and 259 deletions

View File

@ -1,11 +1,9 @@
package app
import (
"fmt"
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/client"
"coopcloud.tech/abra/pkg/config"
stack "coopcloud.tech/abra/pkg/upstream/stack"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
@ -51,16 +49,5 @@ volumes as eligiblef or pruning once undeployed.
return nil
},
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)
}
},
BashComplete: autocomplete.AppNameComplete,
}