diff --git a/jc/man/jc.1.gz b/jc/man/jc.1.gz index db001ebe..ec57ac56 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 db001ebe..ec57ac56 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 e8852f5c..49eee6ae 100644 --- a/templates/manpage_template +++ b/templates/manpage_template @@ -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: