mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 02:48:27 +08:00
v4.41.1
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user