diff --git a/README.md b/README.md index c717584f..517971b2 100644 --- a/README.md +++ b/README.md @@ -204,13 +204,16 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `-v` version information ### Exit Codes -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 tell 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`: -- `ifconfig` exit code = `0`, `jc` exit code = `0`, combined exit code = `0` (no errors) -- `ifconfig` exit code = `1`, `jc` exit code = `0`, combined exit code = `1` (error in `ifconfig`) -- `ifconfig` exit code = `0`, `jc` exit code = `100`, combined exit code = `100` (error in `jc`) -- `ifconfig` exit code = `1`, `jc` exit code = `100`, combined exit code = `101` (error in both `ifconfig` and `jc`) +| `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation | +|----------------------|----------------|--------------------|------------------------------------| +| `0` | `0` | `0` | No errors | +| `1` | `0` | `1` | Error in `ifconfig` | +| `0` | `100` | `100` | Error in `jc` | +| `1` | `100` | `101` | Error in both `ifconfig` and `jc` | + ### Setting Custom Colors via Environment Variable You can specify custom colors via the `JC_COLORS` environment variable. The `JC_COLORS` environment variable takes four comma separated string values in the following format: diff --git a/jc/man/jc.1.gz b/jc/man/jc.1.gz index ec57ac56..413e8b30 100644 Binary files a/jc/man/jc.1.gz and b/jc/man/jc.1.gz differ diff --git a/man/jc.1.gz b/man/jc.1.gz index ec57ac56..413e8b30 100644 Binary files a/man/jc.1.gz and b/man/jc.1.gz differ diff --git a/templates/manpage_template b/templates/manpage_template index 49eee6ae..a1f7fb8c 100644 --- a/templates/manpage_template +++ b/templates/manpage_template @@ -63,18 +63,18 @@ raw JSON output version information .SH EXIT CODES -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 tell 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`: .RS -`ifconfig` exit code = `0`, `jc` exit code = `0`, combined exit code = `0` (no errors) +ifconfig exit code = \fB0\fP, jc exit code = \fB0\fP, combined exit code = \fB0\fP (no errors) -`ifconfig` exit code = `1`, `jc` exit code = `0`, combined exit code = `1` (error in `ifconfig`) +ifconfig exit code = \fB1\fP, jc exit code = \fB0\fP, combined exit code = \fB1\fP (error in ifconfig) -`ifconfig` exit code = `0`, `jc` exit code = `100`, combined exit code = `100` (error in `jc`) +ifconfig exit code = \fB0\fP, jc exit code = \fB100\fP, combined exit code = \fB100\fP (error in jc) -`ifconfig` exit code = `1`, `jc` exit code = `100`, combined exit code = `101` (error in both `ifconfig` and `jc`) +ifconfig exit code = \fB1\fP, jc exit code = \fB100\fP, combined exit code = \fB101\fP (error in both ifconfig and jc) .RE .SH ENVIRONMENT diff --git a/templates/readme_template b/templates/readme_template index f077b5e3..501440a1 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -132,13 +132,16 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `-v` version information ### Exit Codes -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 tell 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`: -- `ifconfig` exit code = `0`, `jc` exit code = `0`, combined exit code = `0` (no errors) -- `ifconfig` exit code = `1`, `jc` exit code = `0`, combined exit code = `1` (error in `ifconfig`) -- `ifconfig` exit code = `0`, `jc` exit code = `100`, combined exit code = `100` (error in `jc`) -- `ifconfig` exit code = `1`, `jc` exit code = `100`, combined exit code = `101` (error in both `ifconfig` and `jc`) +| `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation | +|----------------------|----------------|--------------------|------------------------------------| +| `0` | `0` | `0` | No errors | +| `1` | `0` | `1` | Error in `ifconfig` | +| `0` | `100` | `100` | Error in `jc` | +| `1` | `100` | `101` | Error in both `ifconfig` and `jc` | + ### Setting Custom Colors via Environment Variable You can specify custom colors via the `JC_COLORS` environment variable. The `JC_COLORS` environment variable takes four comma separated string values in the following format: