Yq: Provide a way to persist document delimiters (`---`) when reading a multi-document file

Created on 29 Oct 2020  路  1Comment  路  Source: mikefarah/yq

Currently, reading multiple documents strips the --- delimiter that denotes the start of each document. For instance, take the following file:

---
a: 1
---
a: 2
---
a: 3

And run the following

yq r -d'*' test.yaml ""

It outputs the following:

a: 1
a: 2
a: 3

The output here is invalid yaml, and moreover; there might be times where you might want to keep the output as multiple documents. Ideally there should be a way to produce this output:

---
a: 1
---
a: 2
---
a: 3
enhancement

Most helpful comment

Going to add a way of doing this in v4 (currently in dev)

>All comments

Going to add a way of doing this in v4 (currently in dev)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdaguerre picture cdaguerre  路  4Comments

pcrocker-pivotal picture pcrocker-pivotal  路  3Comments

jodh-intel picture jodh-intel  路  3Comments

curiositycasualty picture curiositycasualty  路  5Comments

OnkelTem picture OnkelTem  路  8Comments