diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/wm-request | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/wm-request b/scripts/wm-request index 618da62..c98e748 100755 --- a/scripts/wm-request +++ b/scripts/wm-request @@ -1,5 +1,12 @@ #!/bin/sh +nopygments=0 +if [ "$1" = "-p" ] +then + nopygments=1 + shift +fi + if ! [ "$1" ] then echo "Usage: $0 VERB [ARGS]" >&2 @@ -15,7 +22,7 @@ set -eu 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 |