4 ms·
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='py
by sciurus 14y ago
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