From 1a964c50557e4fa8636d9a3233fde24c8a41e83e Mon Sep 17 00:00:00 2001 From: justin-f-perez Date: Sat, 19 Mar 2022 18:54:24 -0500 Subject: [PATCH] update cli help (#1146) - remove duplicate comment - add common use case (json -> idiomatic yml) --- cmd/root.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index d4ea034c..32880ca2 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -21,7 +21,10 @@ See https://mikefarah.gitbook.io/yq/ for detailed documentation and examples.`, cat myfile.yml | yq '.stuff' # update myfile.yml in place -yq -i '.stuff = "foo"' myfile.yml # update myfile.yml inplace +yq -i '.stuff = "foo"' myfile.yml + +# print contents of sample.json as idiomatic YAML +yq -P '.' sample.json `, RunE: func(cmd *cobra.Command, args []string) error {