Hacker News new | ask | show | jobs
by tyingq 1621 days ago
That's pretty cool. Would be nice if there was an option to put the currently used filter/query into the shell history or the clipboard. So that you could experiment to find the right one, then back out and use it in a pipeline.
1 comments

Cat xxx.json | fx 'whatever' | fx

Is how I usually do so, if you don't want the interactive mode drop the last pipe

Not sure I understand. I mean using the interactive mode to figure out the right query ("[].mumble.whatever...") and then being able to save the text of the query that you figured out by pointing and clicking. Like a graphical SQL query builder allows you to do.
You can do this with `jid -q`: https://github.com/simeji/jid

(Its interactivity is keyboard- rather than mouse-based.)

Oh, that's great...outputs a jq-compatible query. Thanks!