aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
Diffstat (limited to '.functions')
-rw-r--r--.functions4
1 files changed, 1 insertions, 3 deletions
diff --git a/.functions b/.functions
index 833f5e6..0ae79c9 100644
--- a/.functions
+++ b/.functions
@@ -21,9 +21,7 @@ function httpcompression() {
function json() {
if [ -p /dev/stdin ]; then
# piping, e.g. `echo '{"foo":42}' | json`
- while read data; do
- python -mjson.tool <<< "$data" | pygmentize -l javascript
- done
+ python -mjson.tool | pygmentize -l javascript
else
# e.g. `json '{"foo":42}'`
python -mjson.tool <<< "$*" | pygmentize -l javascript