From 64c3ce35e1493728c65191d9b16183841ad73ca7 Mon Sep 17 00:00:00 2001 From: Bob Williams Date: Mon, 24 Mar 2014 14:24:00 -0400 Subject: [PATCH] adding xargs -0 to node aliases --- plugins/jsontools/jsontools.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh index 34ff9cc75..729763c33 100644 --- a/plugins/jsontools/jsontools.plugin.zsh +++ b/plugins/jsontools/jsontools.plugin.zsh @@ -6,7 +6,7 @@ if [[ $(whence $JSONTOOLS_METHOD) = "" ]]; then fi if [[ $(whence node) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xnode" ) ]]; then - alias pp_json='node -e "console.log(JSON.stringify(JSON.parse(process.argv[1]), null, '\t'));"' + alias pp_json='xargs -0 node -e "console.log(JSON.stringify(JSON.parse(process.argv[1]), null, 4));"' elif [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then alias pp_json='python -mjson.tool' elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xruby" ) ]]; then