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

Better handling of jq_filter and files #102

Closed dprunier closed 4 years ago

dprunier commented 4 years ago

This PR tries to restore the behavior which I believe was expected, based on JQ behavior.

Valid usage are:

Invalid usage are:

kislyuk commented 4 years ago

Thank you! You are absolutely right, these inconsistencies with the jq API need to be corrected.

Would you mind adding test assertions in test/test.py, just asserting that the commands succeed?

dprunier commented 4 years ago

Sorry, was on holidays. Yes, i will add these. Thanks.

dprunier commented 4 years ago

@kislyuk I just added a test case, which uncovered a regression (who says tests aren't useful :D)

kislyuk commented 4 years ago

Thanks! Really appreciate your help with this, and the thorough test case.