fix: autocomplete for recipe versions

This commit is contained in:
decentral1se 2021-12-25 17:12:22 +01:00
parent e2c3bc35c3
commit 653b6c6d49
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 6 additions and 4 deletions

View File

@ -3,16 +3,18 @@ package recipe
import ( import (
"coopcloud.tech/abra/cli/formatter" "coopcloud.tech/abra/cli/formatter"
"coopcloud.tech/abra/cli/internal" "coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/catalogue" "coopcloud.tech/abra/pkg/catalogue"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
var recipeVersionCommand = &cli.Command{ var recipeVersionCommand = &cli.Command{
Name: "versions", Name: "versions",
Usage: "List recipe versions", Usage: "List recipe versions",
Aliases: []string{"v"}, Aliases: []string{"v"},
ArgsUsage: "<recipe>", ArgsUsage: "<recipe>",
BashComplete: autocomplete.RecipeNameComplete,
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
recipe := internal.ValidateRecipe(c) recipe := internal.ValidateRecipe(c)