Created
May 31, 2022 17:57
-
-
Save ylmrx/2395f049957149a2181be1eb61ea867b to your computer and use it in GitHub Desktop.
color jq request builder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jzq() { | |
local in | |
temp=`mktemp` | |
while read in; do | |
echo "$in" >> $temp | |
done | |
fzf --print-query --preview \ | |
"cat $temp | jq {q} | bat -l json --color always -n -p" \ | |
--preview-window 'top,99%' --reverse --no-info <<< '' | |
rm $temp | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install bat and jq.
this should work with any bash-able environment.
example command: