Quantcast
Viewing all articles
Browse latest Browse all 521

Run jq in fzf preview with arguments

I have some json data and I want to interactively query it with fzf and jq, by sending the data through stdin and typing the jq query into the fzf query box.

My attempt so far is showing one result in the box, but editing the contents of the query box turns the results blank instead.

fzf-tmux --preview 'jq "$@"<<< {}'<<<'[{"x": 1}, {"y": 2}]'

Viewing all articles
Browse latest Browse all 521

Trending Articles