From 8db3e6329d25ae3e7d6c4996b5a0c3a5f31d645e Mon Sep 17 00:00:00 2001 From: Bob Williams Date: Mon, 24 Mar 2014 13:36:26 -0400 Subject: [PATCH] bug fix for node pp_json version --- 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 7b6f8c58..ee092ff0 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(process.argv[1]), null, 4)"' + alias pp_json='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