From 6138467ad25113dd4d7029dd90aaa542b3fd1e7b Mon Sep 17 00:00:00 2001 From: ryohma0510 Date: Sat, 15 Jul 2023 03:04:10 +0000 Subject: [PATCH] Improve comparing tips document --- usage/tips-and-tricks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/tips-and-tricks.md b/usage/tips-and-tricks.md index 8051fe21..eaa146f4 100644 --- a/usage/tips-and-tricks.md +++ b/usage/tips-and-tricks.md @@ -148,7 +148,7 @@ yq -n '.someNew="content"' > newfile.yml The best way to run a diff is to use `yq` to normalise the yaml files and then just use diff. Here is a simple example of using pretty print `-P` to normalise the styling and running diff: ``` -diff <(yq -P 'sort_keys(..)' file1.yaml) <(yq -P 'sort_keys(..)' file2.yaml) +diff <(yq -P 'sort_keys(..)' -o=props file1.yaml) <(yq -P 'sort_keys(..)' -o=props file2.yaml) ``` This way you can use the full power of `diff` and normalise the yaml files as you like.