Joined October 2013
·

leesei

Hong Kong
·
·

Posted to Pretty Print JSON in the Terminal over 1 year ago

@antonov, I tried:
alias jsonpp='cat $1 | python -mjson.tool | pygmentize -l'
but the python have problem getting the piped input.

So I used a function:
function jsonpp () { cat "$@" | python -mjson.tool | pygmentize -l json }

Why not adding -g to allow auto detection of lexer ;-) ?

Achievements
68 Karma
0 Total ProTip Views