yq icon indicating copy to clipboard operation
yq copied to clipboard

[xq] --tab is not compatible with --xml-output

Open Dmole opened this issue 4 years ago • 4 comments

xq --xml-output --tab "." $EG

This should be noted in --help or better yet fixed.

Dmole avatar Jun 26 '21 12:06 Dmole

This is not the yq library you're looking for.

kislyuk avatar Oct 31 '21 17:10 kislyuk

How not?

xq | grep -iP "kislyuk|tab|xml-output"
See https://github.com/kislyuk/xq for more information.
  --xml-output, -x      Transcode jq JSON output back into XML and emit it
  --tab            use tabs for indentation;

(curl -v https://github.com/kislyuk/xq > /dev/null ) 2>&1 | grep "location:"
< location: https://github.com/kislyuk/yq

Dmole avatar Oct 31 '21 17:10 Dmole

Apologies, I did not look carefully enough. Yes, jq has a --tab option and that option has no effect on the output of xq --xml-output. I will document this.

kislyuk avatar Nov 01 '21 03:11 kislyuk

@Dmole you can postprocess xq output with tidy -i.

pyhedgehog avatar Mar 13 '24 09:03 pyhedgehog