Closed dprunier closed 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?
Sorry, was on holidays. Yes, i will add these. Thanks.
@kislyuk I just added a test case, which uncovered a regression (who says tests aren't useful :D)
Thanks! Really appreciate your help with this, and the thorough test case.
This PR tries to restore the behavior which I believe was expected, based on JQ behavior.
Valid usage are:
yq < file
(not working with yq-2.10.1)yq filter < file
yq filter file
yq filter file1 file2 ...
yq -f filter < file
(not working with yq-2.10.1)yq -f filter file
(not working with yq-2.10.1)yq -f filter file1 file2 ...
Invalid usage are:
yq
on a TTYyq filter
on a TTYyq -f filter
on a TTY