mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-21 00:19:42 +02:00
formatting
This commit is contained in:
13
README.md
13
README.md
@ -204,13 +204,16 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
|||||||
- `-v` version information
|
- `-v` version information
|
||||||
|
|
||||||
### Exit Codes
|
### 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`:
|
Consider the following examples using `ifconfig`:
|
||||||
- `ifconfig` exit code = `0`, `jc` exit code = `0`, combined exit code = `0` (no errors)
|
| `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation |
|
||||||
- `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`)
|
| `0` | `0` | `0` | No errors |
|
||||||
- `ifconfig` exit code = `1`, `jc` exit code = `100`, combined exit code = `101` (error in both `ifconfig` and `jc`)
|
| `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
|
### 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:
|
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:
|
||||||
|
BIN
jc/man/jc.1.gz
BIN
jc/man/jc.1.gz
Binary file not shown.
BIN
man/jc.1.gz
BIN
man/jc.1.gz
Binary file not shown.
@ -63,18 +63,18 @@ raw JSON output
|
|||||||
version information
|
version information
|
||||||
|
|
||||||
.SH EXIT CODES
|
.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`:
|
Consider the following examples using `ifconfig`:
|
||||||
|
|
||||||
.RS
|
.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
|
.RE
|
||||||
|
|
||||||
.SH ENVIRONMENT
|
.SH ENVIRONMENT
|
||||||
|
@ -132,13 +132,16 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
|||||||
- `-v` version information
|
- `-v` version information
|
||||||
|
|
||||||
### Exit Codes
|
### 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`:
|
Consider the following examples using `ifconfig`:
|
||||||
- `ifconfig` exit code = `0`, `jc` exit code = `0`, combined exit code = `0` (no errors)
|
| `ifconfig` exit code | `jc` exit code | Combined exit code | Interpretation |
|
||||||
- `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`)
|
| `0` | `0` | `0` | No errors |
|
||||||
- `ifconfig` exit code = `1`, `jc` exit code = `100`, combined exit code = `101` (error in both `ifconfig` and `jc`)
|
| `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
|
### 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:
|
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:
|
||||||
|
Reference in New Issue
Block a user