From 5e6111e6c06e0f8f3252bb7088d92ecb113a35ea Mon Sep 17 00:00:00 2001 From: cleverhu Date: Tue, 6 Sep 2022 20:10:06 +0800 Subject: [PATCH] add shorthand for labels columns Signed-off-by: cleverhu --- changelogs/unreleased/5291-cleverhu | 1 + pkg/cmd/util/output/output.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/5291-cleverhu diff --git a/changelogs/unreleased/5291-cleverhu b/changelogs/unreleased/5291-cleverhu new file mode 100644 index 000000000..0cf9b7a15 --- /dev/null +++ b/changelogs/unreleased/5291-cleverhu @@ -0,0 +1 @@ +Add more detailed comments for labels columns. \ No newline at end of file diff --git a/pkg/cmd/util/output/output.go b/pkg/cmd/util/output/output.go index ab3f7a95d..1b0a99219 100644 --- a/pkg/cmd/util/output/output.go +++ b/pkg/cmd/util/output/output.go @@ -41,7 +41,7 @@ const downloadRequestTimeout = 30 * time.Second func BindFlags(flags *pflag.FlagSet) { flags.StringP("output", "o", "table", "Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. 'table' is not valid for the install command.") labelColumns := flag.NewStringArray() - flags.Var(&labelColumns, "label-columns", "A comma-separated list of labels to be displayed as columns") + flags.VarP(&labelColumns, "label-columns", "L", "Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...") flags.Bool("show-labels", false, "Show labels in the last column") }