From 9bdc4a96ca0178c7eb2b5bae8fe9d0f5d0ca92b8 Mon Sep 17 00:00:00 2001 From: PiMaDaum Date: Sun, 29 Jan 2023 21:36:45 +0100 Subject: [PATCH] create filter flag description --- resource/list.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resource/list.go b/resource/list.go index df246c2..999dd85 100644 --- a/resource/list.go +++ b/resource/list.go @@ -58,7 +58,11 @@ var celEnvOptions = []cel.EnvOption{ func init() { ResourceListCmd.Flags().Bool("favorite", false, "Resources that are marked as favorite") ResourceListCmd.Flags().Bool("own", false, "Resources that are owned by me") - ResourceListCmd.Flags().String("filter", "", "Define a CEl expression as filter for resources.") + ResourceListCmd.Flags().String("filter", "", + "Define a CEl expression as filter for resources. In the expression, all available columns can be used (see -c/--column).\n"+ + "See also CEl specifications under https://github.com/google/cel-spec."+ + "\nExample:\n\t--filter '(Name == \"SomeName\" || matches(Name, \"RegExpr\")) && URI.startsWith(\"https://auth.\")'\n"+ + "Available builtin functions:\n\tparseTimestamp(string): It parses a string to an timestamp like the layout '2006-01-02+15:04:05' (see golangs time.Parse documentation)") ResourceListCmd.Flags().StringP("group", "g", "", "Resources that are shared with group") ResourceListCmd.Flags().StringArrayP("folder", "f", []string{}, "Resources that are in folder")