-#/bin/sh
+#!/bin/sh
+
+nopygments=0
+if [ "$1" = "-p" ]
+then
+ nopygments=1
+ shift
+fi
if ! [ "$1" ]
then
if which python 2>/dev/null 1>&2 && echo '{ "test": "1" }' | python -m json.tool 2>/dev/null 1>&2
then
- if which pygmentize 2>/dev/null 1>&2
+ if [ $nopygments = 0 ] && which pygmentize 2>/dev/null 1>&2
then
json_pretty() {
python -m json.tool | pygmentize -l json