News for hackers. Stuff that matters.
Re:PJSON: pretty, colorful json output formatting for terminal by michaelmior on Tuesday September 18, 2012 @09:44PM (#4541597)
alias pjson='pygmentize -l json'
Re:PJSON: pretty, colorful json output formatting for terminal by sciurus on Thursday September 20, 2012 @12:33PM (#4549347)
I'm curious how the author managed to learn the pygments library without learning it already provided a command. This script can be replaced by

alias pjson='pygmentize -l json'

If you're passing it the file name, pygmentize will figure out the lexer to use, e.g.

pygmentize foo.json

pygmentize bar.rb

It's only when you have it read from stdin that you need to specify, e.g.

pygmentize -l json < foo.json