Releases: mikefarah/yq
2.3.0
2.2.1
2.2.0
2.1.2 - Fixed file permissions when writing in place
More linux binaries
Merge arrays and read multiple documents
Fixes writing in-place with docker
Fix for #156.
Minor fix to help text, -j --tojson no longer appear as global options as the only work for the 'read' command.
Multiple Document Support!
Finally added multiple document support!
Use the '-d' argument to specify a particular document, default to 0 (first doc) if not specified.
yq r -d1 content.yaml this.deep[0].path
yq w -d1 content.yaml this.deep[0].path newValue
yq w -d'*' content.yaml this.deep[0].path newValue
Backward breaking change
A result of this is that now only the read command supports the JSON output flag, all other commands do not (as you cannot have multiple documents in a JSON file. If you still want JSON output you'll need to pipe:
yq w -d1 content.yaml this.deep[0].path newValue | yq r -d1 -
Fixed #9
Multiple Document Support!
Finally added multiple document support!
Use the '-d' argument to specify a particular document, default to 0 (first doc) if not specified.
yq r -d1 content.yaml this.deep[0].path
yq w -d1 content.yaml this.deep[0].path newValue
Backward breaking change
A result of this is that now only the read command supports the JSON output flag, all other commands do not (as you cannot have multiple documents in a JSON file. If you still want JSON output you'll need to pipe:
yq w -d1 content.yaml this.deep[0].path newValue | yq r -d1 -
Currently in beta and available just in Git - will promote to brew, snap etc shortly
Fixed #9
1.15.0
Implemented a delete command and associated tests for deleting a node from YAML input. This behaves in a similar manner as the write command.
The following functionality is not provided, although could conceivably be added with a modicum of additional effort if there is strong opinion that they are required:
Specify the node(s) to delete using a script (as with the write command)
Deleting common elements from all members of an array (deletions from individual members are supported using a path like a.b[0].name, but deleting from all instances in one pass, e.g. a.b[*].name, is not).
Thanks @mhuxtable !