This commit is contained in:
Mike Farah
2024-02-16 09:55:01 +11:00
parent 5edabcf934
commit b2965d58a6
2 changed files with 46 additions and 7 deletions
+10 -3
View File
@@ -14,12 +14,19 @@ Feel free to use multiple lines in your expression to improve readability.
Use `with` if you need to make several updates to the same path.
Use `# comments` to explain things
```bash
yq --inplace '
with(.a.deeply.nested;
. = "newValue" | . style="single") |
with(.a.deeply.nested;
. = "newValue" | . style="single" # line comment about styles
) |
#
# Block comment that explains what is happening.
#
with(.b.another.nested;
. = "cool" | . style="folded")
. = "cool" | . style="folded"
)
' my_file.yaml
```