diff --git a/cli/recipe/list.go b/cli/recipe/list.go index d610ae76..cc337889 100644 --- a/cli/recipe/list.go +++ b/cli/recipe/list.go @@ -40,6 +40,7 @@ var recipeListCommand = &cli.Command{ tableCol := []string{"name", "category", "status", "healthcheck", "backups", "email", "tests", "SSO"} table := formatter.CreateTable(tableCol) + len := 0 for _, recipe := range recipes { tableRow := []string{ recipe.Name, @@ -55,13 +56,15 @@ var recipeListCommand = &cli.Command{ if pattern != "" { if strings.Contains(recipe.Name, pattern) { table.Append(tableRow) + len++ } } else { table.Append(tableRow) + len++ } } - table.SetCaption(true, fmt.Sprintf("total recipes: %v", len(recipes))) + table.SetCaption(true, fmt.Sprintf("total recipes: %v", len)) if table.NumLines() > 0 { table.Render()