Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Last active September 8, 2021 19:23
Show Gist options
  • Save diegopacheco/cb568cac5b31ee2ac4108197f8691488 to your computer and use it in GitHub Desktop.
Save diegopacheco/cb568cac5b31ee2ac4108197f8691488 to your computer and use it in GitHub Desktop.
How to get color json on the Linux console?
sudo npm install jsontool -g
sudo pip install pygments
 curl $URL | json | pygmentize -l json
sudo vim ~/.bashrc
function jcurl() {
    curl "$@" | json | pygmentize -l json
}
export -f jcurl

function tojson(){
  json | pygmentize -l json
}
export -f tojson
source ~/.bashrc
jcurl $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment