B Thibault пре 9 година
родитељ
комит
c13630fac5
2 измењених фајлова са 9 додато и 2 уклоњено
  1. 7 2
      doc/jsonstroll.1
  2. 2 0
      src/params.cpp

+ 7 - 2
doc/jsonstroll.1

@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH JSONSTROLL "1" "October 2016" "jsonstroll (jsonstroller suite) 1.0RC1 generated on Oct 30 2016" "User Commands"
+.TH JSONSTROLL "1" "November 2016" "jsonstroll (jsonstroller suite) 1.0RC1 generated on Nov  5 2016" "User Commands"
 .SH NAME
-jsonstroll \- manual page for jsonstroll (jsonstroller suite) 1.0RC1 generated on Oct 30 2016
+jsonstroll \- manual page for jsonstroll (jsonstroller suite) 1.0RC1 generated on Nov  5 2016
 .SH SYNOPSIS
 .B jsonstroll
 [\fI\,OPTIONS\/\fR]
@@ -42,6 +42,9 @@ colorize output, MODE can be never or always (default when ommited)
 \fB\-\-compress\fR
 if output is redirected, strip unnecessaries characters
 .TP
+\fB\-\-diff\-cmd\fR COMMAND ;
+Execute command as external diff. All following argument will be passed as parameter to COMMAND until ';' is encountered. The '{}' argument will be replaced by the file path of the prettified input
+.TP
 \fB\-v\fR, \fB\-version\fR
 display version information
 .TP
@@ -51,6 +54,8 @@ show this message and exit
 jsonstroll f.json       Output f.json's content
 .PP
 jsonstroll \-\-diff fileA.json fileB.json compare fileA.json and fileB.json
+.PP
+jsonstroll \-\-diff\-cmd vimdiff {} ';' fileA.json fileB.json      compare fileA.json and fileB.json
 .SH AUTHOR
 Written by isundil <isundill@gmail.com>.
 .SH "REPORTING BUGS"

+ 2 - 0
src/params.cpp

@@ -166,12 +166,14 @@ void Params::usage() const noexcept
     << "  --keep-order\t\tdo not sort objects by key" << std::endl
     << "  --color[=MODE]\tcolorize output, MODE can be never or always (default when ommited)" << std::endl
     << "  --compress\tif output is redirected, strip unnecessaries characters" << std::endl
+    << "  --diff-cmd COMMAND ;\tExecute command as external diff. All following argument will be passed as parameter to COMMAND until ';' is encountered. The '{}' argument will be replaced by the file path of the prettified input" << std::endl
     << "  -v, -version\t\tdisplay version information" << std::endl
     << "  -h, --helph\t\tshow this message and exit" << std::endl << std::endl
 
     << "Examples:" << std::endl
     << STROLL_PROGNAME << " f.json\tOutput f.json's content" << std::endl << std::endl
     << STROLL_PROGNAME << " --diff fileA.json fileB.json\tcompare fileA.json and fileB.json" << std::endl << std::endl
+    << STROLL_PROGNAME << " --diff-cmd vimdiff {} ';' fileA.json fileB.json\tcompare fileA.json and fileB.json" << std::endl << std::endl
 
     << "Report bugs to <isundill@gmail.com>" << std::endl;
 }