Blacksmoke16 / oq

A performant, and portable jq wrapper to facilitate the consumption and output of formats other than JSON; using jq filters to transform the data.
https://blacksmoke16.github.io/oq/
MIT License
190 stars 15 forks source link

Ignore stdin when using --null-input #101

Closed Lucidiot closed 2 years ago

Lucidiot commented 2 years ago

oq --null-input . or oq -n . should not be waiting for anything coming from stdin, considering that jq will ignore stdin and just use null as the input.

Currently, doing oq -n . will immediately return null, but will still be waiting for something from stdin. The workaround is to send anything or just /dev/null to it:

$ jq -n .
null
$ oq -n .
null
^C
$ oq -n . </dev/null
null
$ echo lol | oq -n .
null

Thanks for this super cool tool by the way :+1: