kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.57k stars 82 forks source link

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

Open Dmole opened 3 years ago

Dmole commented 3 years ago

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

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

kislyuk commented 2 years ago

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

Dmole commented 2 years ago

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
kislyuk commented 2 years ago

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.

pyhedgehog commented 5 months ago

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