1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

Merge pull request #139 from kellyjonbrazil/master

sync branches
This commit is contained in:
Kelly Brazil
2021-05-18 10:29:02 -07:00
committed by GitHub
4 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@ jc changelog
20210517 v1.15.4 20210517 v1.15.4
- Update ping parser to support error responses in OSX and BSD - 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 to support `+noall +answer` use case
- Update dig parser compatibility to all platforms - Update dig parser compatibility to all platforms
- Fix colors in Windows terminals (cmd.exe and PowerShell) - Fix colors in Windows terminals (cmd.exe and PowerShell)

View File

@ -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`. 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`: Consider the following examples using `ifconfig`:
| `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation | | `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation |
|----------------------|----------------|--------------------|------------------------------------| |----------------------|----------------|--------------------|------------------------------------|
| `0` | `0` | `0` | No errors | | `0` | `0` | `0` | No errors |

View File

@ -4,12 +4,12 @@ jc \- JSONifies the output of many CLI tools and file-types
.SH SYNOPSIS .SH SYNOPSIS
COMMAND | jc PARSER [OPTIONS] COMMAND | jc PARSER [OPTIONS]
or magic syntax: or "Magic" syntax:
jc [OPTIONS] COMMAND jc [OPTIONS] COMMAND
.SH DESCRIPTION .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 .SH OPTIONS
.B .B
@ -63,7 +63,7 @@ raw JSON output
version information version information
.SH EXIT CODES .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`: Consider the following examples using `ifconfig`:

View File

@ -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`. 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`: Consider the following examples using `ifconfig`:
| `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation | | `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation |
|----------------------|----------------|--------------------|------------------------------------| |----------------------|----------------|--------------------|------------------------------------|
| `0` | `0` | `0` | No errors | | `0` | `0` | `0` | No errors |