From 772d369058cacd51b371c478c21a437171262a91 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 28 Jan 2022 13:02:25 +1100 Subject: [PATCH] Added notice for older versions of yq --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 3bb29da6..c4e5c41d 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,32 @@ a lightweight and portable command-line YAML, JSON and XML processor. `yq` uses yq is written in go - so you can download a dependency free binary for your platform and you are good to go! If you prefer there are a variety of package managers that can be used as well as Docker and Podman, all listed below. +## Notice for v4.x versions prior to 4.18.1 +Since 4.18.1, yq's 'eval/e' command is the _default_ command and no longers needs to be specified. + +Older versions will still need to specify 'eval/e'. + +Similarly, '-' is no longer required as a filename to read from STDIN (unless reading from multiple files). + +TLDR: + +Prior to 4.18.1 +```bash +cat file.yaml | yq e '.cool' - +``` + +4.18+ +```bash +cat file.yaml | yq '.cool' +``` + +When merging multiple files together, `eval-all/ea` is still required to tell `yq` to run the expression again all the document at once. + ## Quick Usage Guide + + + Read a value: ```bash yq '.a.b[0].c' file.yaml