From 773b7f4b1f23e04c90e602aab05bc1a7e5aae37b Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 17 May 2021 08:38:09 -0700 Subject: [PATCH 1/3] add space before exit code table --- README.md | 1 + templates/readme_template | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 517971b2..4bac69df 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio Any fatal errors within `jc` will generate an exit code of `100`, otherwise the exit code will be `0`. When using the "magic" syntax (e.g. `jc ifconfig eth0`), `jc` will store the exit code of the program being parsed and add it to the `jc` exit code. This way it is easier to determine if an error was from the parsed program or `jc`. Consider the following examples using `ifconfig`: + | `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation | |----------------------|----------------|--------------------|------------------------------------| | `0` | `0` | `0` | No errors | diff --git a/templates/readme_template b/templates/readme_template index 501440a1..d1f6cfa6 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -135,6 +135,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio Any fatal errors within `jc` will generate an exit code of `100`, otherwise the exit code will be `0`. When using the "magic" syntax (e.g. `jc ifconfig eth0`), `jc` will store the exit code of the program being parsed and add it to the `jc` exit code. This way it is easier to determine if an error was from the parsed program or `jc`. Consider the following examples using `ifconfig`: + | `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation | |----------------------|----------------|--------------------|------------------------------------| | `0` | `0` | `0` | No errors | From 4e9652a8ec2482a64dc029b0ce0e1047a3e49867 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 17 May 2021 14:36:20 -0700 Subject: [PATCH 2/3] spelling --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 71ac17fa..9f30bcf8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,7 @@ jc changelog 20210517 v1.15.4 - Update ping parser to support error responses in OSX and BSD -- Update ping parser to be more resillient against parsing errors for unknown error types +- Update ping parser to be more resilient against parsing errors for unknown error types - Update dig parser to support `+noall +answer` use case - Update dig parser compatibility to all platforms - Fix colors in Windows terminals (cmd.exe and PowerShell) From 95aec9c6f9aa8fb4d0dae227410a1346d550f47f Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 18 May 2021 10:27:36 -0700 Subject: [PATCH 3/3] add info about Magic syntax not supporting shell builtins --- templates/manpage_template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/manpage_template b/templates/manpage_template index a1f7fb8c..ecdc814e 100644 --- a/templates/manpage_template +++ b/templates/manpage_template @@ -4,12 +4,12 @@ jc \- JSONifies the output of many CLI tools and file-types .SH SYNOPSIS COMMAND | jc PARSER [OPTIONS] -or magic syntax: +or "Magic" syntax: jc [OPTIONS] COMMAND .SH DESCRIPTION -jc JSONifies the output of many CLI tools and file-types for easier parsing in scripts. jc accepts piped input from \fBSTDIN\fP and outputs a JSON representation of the previous command's output to \fBSTDOUT\fP. Alternatively, the "magic" syntax can be used by prepending jc to the command to be converted. Options can be passed to jc immediately before the command is given. (Note: command aliases are not supported). +jc JSONifies the output of many CLI tools and file-types for easier parsing in scripts. jc accepts piped input from \fBSTDIN\fP and outputs a JSON representation of the previous command's output to \fBSTDOUT\fP. Alternatively, the "Magic" syntax can be used by prepending jc to the command to be converted. Options can be passed to jc immediately before the command is given. (Note: "Magic" syntax does not support shell builtins or command aliases) .SH OPTIONS .B @@ -63,7 +63,7 @@ raw JSON output version information .SH EXIT CODES -Any fatal errors within jc will generate an exit code of \fB100\fP, otherwise the exit code will be \fB0\fP. When using the "magic" syntax (e.g. \fBjc ifconfig eth0\fP), jc will store the exit code of the program being parsed and add it to the jc exit code. This way it is easier to determine if an error was from the parsed program or jc. +Any fatal errors within jc will generate an exit code of \fB100\fP, otherwise the exit code will be \fB0\fP. When using the "Magic" syntax (e.g. \fBjc ifconfig eth0\fP), jc will store the exit code of the program being parsed and add it to the jc exit code. This way it is easier to determine if an error was from the parsed program or jc. Consider the following examples using `ifconfig`: