Rework color option

Rework the color option to support setting ANSI color code values
ranging from 0..255 or "none" for no color or "list" to print a list of
available ANSI colors codes.

Also, disables color when piping.
This commit is contained in:
Martin Lund 2022-06-08 16:15:17 +02:00
parent 2519e2081a
commit 46b5783789
8 changed files with 67 additions and 32 deletions

View file

@ -123,11 +123,13 @@ If defining more than one flag, the flags must be comma separated.
Enable hexadecimal mode.
.TP
.BR \-c ", " "\-\-color " \fI<code>
.BR \-c ", " "\-\-color " \fI0..255|none|list
Colorize tio text using ANSI color code ranging from 0 to 255.
Colorize tio text using ANSI color code value ranging from 0 to 255 or use "none" for no color.
If color code is negative a list of available ANSI colors will be printed.
Use "list" to print a list of available ANSI color codes.
Default value is 15.
.TP
.BR \-S ", " "\-\-socket \fI<socket>\fR\fB