Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cyberjso/77c34f4c650b70261e0420954d18b5eb to your computer and use it in GitHub Desktop.
Save cyberjso/77c34f4c650b70261e0420954d18b5eb 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