8db3e6329d25ae3e7d6c4996b5a0c3a5f31d645e

Author
Bob Williams <bobwilliams.ii@gmail.com>
Committer
Bob Williams <bobwilliams.ii@gmail.com>
Date

Message

bug fix for node pp_json version

Diff

 1diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh
 2index 7b6f8c585d8737a8314f8129e2aa5945fd2ba3d2..ee092ff0993abab48997291acad3b737eac772ae 100644
 3--- a/plugins/jsontools/jsontools.plugin.zsh
 4+++ b/plugins/jsontools/jsontools.plugin.zsh
 5@@ -6,7 +6,7 @@ if [[ $(whence $JSONTOOLS_METHOD) = "" ]]; then
 6 fi
 7 
 8 if [[ $(whence node) != "" && ( "x$JSONTOOLS_METHOD" = "x"  || "x$JSONTOOLS_METHOD" = "xnode" ) ]]; then
 9-    alias pp_json='node -e "console.log(JSON.stringify(process.argv[1]), null, 4)"'
10+    alias pp_json='node -e "console.log(JSON.stringify(JSON.parse(process.argv[1]), null, 4));"'
11 elif [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then
12 	alias pp_json='python -mjson.tool'
13 elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xruby" ) ]]; then