Add '-c, --color' option

Allow user to select which ANSI color code to use to colorize the tio
text. To successfully set the color the color code must be in the range
0..255.

If color code is negative tio will print all available ANSI colors.

The default color is changed to bold white to make tio defaults usable
for most users, including color blind users.
This commit is contained in:
Martin Lund 2022-02-14 09:08:54 +01:00
parent 32e853e46e
commit 274cb63197
7 changed files with 55 additions and 16 deletions

View file

@ -11,7 +11,7 @@ tio \- a simple TTY terminal I/O tool
.SH "DESCRIPTION"
.PP
.B tio
is a simple TTY terminal tool which features a straightforward commandline
is a simple TTY terminal tool which features a straightforward command-line
interface to easily connect to TTY devices for basic I/O operations.
.SH "OPTIONS"
@ -96,6 +96,13 @@ Map NL to CR-NL on output.
If defining more than one flag, the flags must be comma separated.
.RE
.TP
.BR \-c ", " "\-\-color " \fI<0..255>
Colorize tio text using ANSI color code (default: 15).
If color code is negative a list of available ANSI colors will be printed.
.TP
.BR \-v ", " \-\-version