Rework -@ option and tests.

This commit is contained in:
Dianne Skoll
2020-01-27 11:49:41 -05:00
parent adced3ac6c
commit 1606dbbe77
2 changed files with 96 additions and 173 deletions

View File

@@ -74,12 +74,12 @@ only work on terminals that are set to UTF-8 character encoding.
.B 'c'
causes \fBRemind\fR to use VT100 escape sequences to approximate
SPECIAL COLOR reminders. Note that this flag is kept for
backwards-compatibility; you should use the \fB\-@\fI[n]\fR
backwards-compatibility; you should use the \fB\-@\fI[n][,m]\fR
command-line option instead.
.RE
.TP
.B \-@\fR[\fIn\fR]
.B \-@\fR[\fIn\fR][,\fIm\fR]
Tells \fBRemind\fR to approximate SPECIAL COLOR reminders using VT100
escape sequences. The approximation is (of necessity) very
coarse, because the VT100 only has eight different color sequences,
@@ -88,26 +88,21 @@ each with one of two brightnesses. A color component greater than
greater than 128, the color is considered "bright".
.RS
.PP
If you supply the optional \fIn\fR parameter, a value of 0 for \fIn\fR
tells \fBRemind\fR that your terminal background is dark, and a value of
1 tells it that your terminal background is light. In this case, a
black-on-dark color or a white-on-light color is converted to grey so
that the reminder is still visible. If \fIn\fR is not supplied, then
\fBRemind\fR doesn't treat black or white specially and some reminders
may be rendered invisible.
If you supply the optional numeric parameters, the have the following
meanings: \fIn\fR=0 tells \fBRemind\fR to use the standard 16 VT100
colors. \fIn\fR=1 tells it to use an extended 256-color palette supported
by many terminal emulators such as xterm. And \fIn\fR=2 tells it to
use escape sequences that support true 24-bit colors, again supported
by many terminal emulators such as xterm.
.PP
Some terminals (such as "xterm") understand additional escape sequences
that allow for specification of 256 different colors. If you supply
a value of 2, 3 or 4 for \fIn\fR, then \fBRemind\fR uses these enhanced
escape sequences to more closely approximate colors. A value of 2
tells \fBRemind\fR that the terminal background is dark, 3 that it is
light, and 4 that \fBRemind\fR should not do anything special to
compensate for the background.
.PP
Some terminals (again, "xterm" is one) allow you to set exact 24-bit
colors. If you supply a value of 5 for \fIn\fR, then \fBRemind\fR
uses escape sequences to set the exact (R, G, B) color specified
in a SPECIAL COLOR reminder.
If the optional \fIm\fR parameter is supplied following a comma,
then \fIm\fR=0 tells \fBRemind\fR that the terminal background is dark,
and \fBRemind\fR will brighten up dark colors to make them visible. If
\fIm\fR=1, then \fBRemind\fR assumes the terminal background is light
and it will darken bright colors to make them visible. If no \fIm\fR
is supplied, then \fBRemind\fR does not perform any adjustments, and
some reminders may be hard or impossible to see if the color is too close
to the terminal background color.
.RE
.TP
.B \-w\fR\fIcol\fR[,\fIpad\fR[,\fIspc\fR]]]

View File

@@ -5004,44 +5004,21 @@ February 29
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | | | | | |
| | | |BLACK |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
| | | | | | | |
| | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
|-@0 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
@@ -5049,44 +5026,21 @@ February 29
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | | | | | |
| | | |BLACK |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
| | | | | | | |
| | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
|-@0,0 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
@@ -5094,44 +5048,21 @@ February 29
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | | | | | |
| | | |BLACK |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
| | | | | | | |
| | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
|-@0,1 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
@@ -5139,44 +5070,43 @@ February 29
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | |BLACK |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
|-@1 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | |RED |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
+----------+----------+----------+----------+----------+----------+----------+
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | |BLACK |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
| | | | | | | |
| | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|-@1,0 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
@@ -5184,44 +5114,21 @@ February 29
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | | | | | |
| | | |BLACK |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
| | | | | | | |
| | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|-@1,1 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
@@ -5229,43 +5136,64 @@ February 29
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | | | | | |
| | | |BLACK |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | |BLACK |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
| | | | | | | |
| | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|-@2 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | |RED |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
+----------+----------+----------+----------+----------+----------+----------+
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | |BLACK |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
|-@2,0 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | |RED |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+
+----------------------------------------------------------------------------+
| January 2020 |
+----------+----------+----------+----------+----------+----------+----------+
| Sunday | Monday | Tuesday |Wednesday | Thursday | Friday | Saturday |
+----------+----------+----------+----------+----------+----------+----------+
| | | |1 |2 |3 |4 |
| | | |BLACK |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|5 |6 |7 |8 |9 |10 |11 |
|-@2,1 | | |BLACK |BRIGHT |BRIGHT |BRIGHT |
| | | | |BLUE |GREEN |CYAN |
+----------+----------+----------+----------+----------+----------+----------+
|12 |13 |14 |15 |16 |17 |18 |
| | | |RED |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|19 |20 |21 |22 |23 |24 |25 |
| | | |BRIGHT RED|BRIGHT |BRIGHT |BRIGHT |
| | | | |MAGENTA |YELLOW |WHITE |
+----------+----------+----------+----------+----------+----------+----------+
|26 |27 |28 |29 |30 |31 | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+