Use "less" with colors 🎨
I often find myself frustrated when using "less" to consult big amounts of data and I lose all the colours that allows for syntax highlighting. Well, not anymore!
If you want to keep the colors while using jq
combined with less
for big documents you can:
cat file.json | jq -C | less -r
👆
-C
instructs jq to keep the colors even when piping -r
instructs less to interpret the colors
Previous: A better view of the call stack in PHP