mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
add exit codes section
This commit is contained in:
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.
@ -62,6 +62,21 @@ raw JSON output
|
||||
\fB-v\fP
|
||||
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`.
|
||||
|
||||
Consider the following examples using `ifconfig`:
|
||||
|
||||
.RS
|
||||
`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`)
|
||||
.RE
|
||||
|
||||
.SH ENVIRONMENT
|
||||
You can specify custom colors via the \fBJC_COLORS\fP environment variable. The \fBJC_COLORS\fP environment variable takes four comma separated string values in the following format:
|
||||
|
||||
|
Reference in New Issue
Block a user