diff --git a/cmd/krew/cmd/list.go b/cmd/krew/cmd/list.go index ab1afdda7d..bfdd9dfdd1 100644 --- a/cmd/krew/cmd/list.go +++ b/cmd/krew/cmd/list.go @@ -71,7 +71,7 @@ Remarks: } func printTable(out io.Writer, columns []string, rows [][]string) error { - w := tabwriter.NewWriter(out, 0, 0, 1, ' ', 0) + w := tabwriter.NewWriter(out, 0, 0, 2, ' ', 0) fmt.Fprintf(w, strings.Join(columns, "\t")) fmt.Fprintln(w) for _, values := range rows { diff --git a/cmd/krew/cmd/search.go b/cmd/krew/cmd/search.go index 5f93b5d56d..4751c8b9bc 100644 --- a/cmd/krew/cmd/search.go +++ b/cmd/krew/cmd/search.go @@ -16,6 +16,7 @@ package cmd import ( "os" + "runtime" "strings" "github.com/pkg/errors" @@ -73,18 +74,18 @@ Examples: } var rows [][]string - cols := []string{"NAME", "DESCRIPTION", "STATUS"} + cols := []string{"NAME", "DESCRIPTION", "INSTALLED"} for _, name := range matchNames { plugin := pluginMap[name] var status string if _, ok := installed[name]; ok { - status = "installed" + status = "yes" } else if _, ok, err := plugin.Spec.GetMatchingPlatform(); err != nil { return errors.Wrapf(err, "failed to get the matching platform for plugin %s", name) } else if ok { - status = "available" + status = "no" } else { - status = "unavailable" + status = "unavailable on " + runtime.GOOS } rows = append(rows, []string{name, limitString(plugin.Spec.ShortDescription, 50), status}) }