f8890f564648d647903f5b10358a4f25f312d54a

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

Message

updated readme.md and using tab char for formatting with node

Diff

 1diff --git a/plugins/jsontools/README.md b/plugins/jsontools/README.md
 2index 60f99c5be390d75f15d2c1b7fe96513e52ca1ceb..9f07194c90f8f8495a0d2c379972d87f61fe3611 100644
 3--- a/plugins/jsontools/README.md
 4+++ b/plugins/jsontools/README.md
 5@@ -1,9 +1,15 @@
 6 # jsontools
 7 
 8-A handy command line tool for dealing with json data.
 9+Handy command line tools for dealing with json data.
10+
11+## Tools
12+
13+- **pp_json** - pretty prints json
14 
15 ## Usage
16 
17+##### pp_json - examples
18+
19 ```sh
20 # curl json data and pretty print the results
21 curl https://coderwall.com/bobwilliams.json | pp_json
22@@ -12,4 +18,5 @@ curl https://coderwall.com/bobwilliams.json | pp_json
23 less data.json | pp_json
24 
25 # json data directly from the command line
26-echo '{"b":2, "a":1}' | pp_json
27+echo '{"b":2, "a":1}' | pp_json
28+```
29diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh
30index ee092ff0993abab48997291acad3b737eac772ae..34ff9cc75884637278d624160cfc5aacb1aa9b93 100644
31--- a/plugins/jsontools/jsontools.plugin.zsh
32+++ b/plugins/jsontools/jsontools.plugin.zsh
33@@ -6,7 +6,7 @@ if [[ $(whence $JSONTOOLS_METHOD) = "" ]]; then
34 fi
35 
36 if [[ $(whence node) != "" && ( "x$JSONTOOLS_METHOD" = "x"  || "x$JSONTOOLS_METHOD" = "xnode" ) ]]; then
37-    alias pp_json='node -e "console.log(JSON.stringify(JSON.parse(process.argv[1]), null, 4));"'
38+    alias pp_json='node -e "console.log(JSON.stringify(JSON.parse(process.argv[1]), null, '\t'));"'
39 elif [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then
40 	alias pp_json='python -mjson.tool'
41 elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xruby" ) ]]; then