Skip to content

Dear YQ, Why do you eat my Comments? #965

Answered by mikefarah
rhatfield-bushel asked this question in Q&A
Discussion options

You must be logged in to vote

Dear confused developer,

I am greedily eating your first comment because I think it's a document header (its pre-processed as part of a workaround/hack for a go-yaml issue).

My appetite is never sated, however you can force me not to eat you header by:

yq e --header-preprocess=false  '{"prefix":.}' test.yaml 

Sincere apologies,
yq

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@rhatfield-bushel
Comment options

Answer selected by rhatfield-bushel
Comment options

You must be logged in to vote
4 replies
@mikefarah
Comment options

@chr1shung
Comment options

@mikefarah
Comment options

@chr1shung
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants