noahgorstein / jqp

A TUI playground to experiment with jq
MIT License
2.19k stars 40 forks source link

Ability to specify query via command line #65

Closed greggannicott closed 5 months ago

greggannicott commented 5 months ago

It would be useful to be able to specify the query via the command line and have the query input pre-populated with the query, and the results applying the query.

My example use case is that I'm using jq to run queries and view them on the command line. It would be handy to easily switch to jqp to have the results displayed in jqp instead.

I realise I could just pipe data through jq before jqp (eg. jq 'my query' | jqp) but it would be helpful for the query to be passed in too.

So something like:

curl "http://mydomain.com" | jqp 'my query'

Thanks.

noahgorstein commented 5 months ago

Sure thing. Great suggestion. Should be a fairly straightforward addition.

noahgorstein commented 5 months ago

Should be in next release !

noahgorstein commented 4 months ago

this is now officially released in v0.7.0