[Remind-Fans] Adjusting width for ANSI sequences in calprefix/calsuffix
Tim Chase
remind at tim.thechases.com
Mon Jan 13 14:28:21 EST 2020
Playing around:
FSET calprefix(x) "X:"
FSET calsuffix(x) ":Y"
MSG "this is a very important thing"
when invoked with "-c+" all my very important reminders are wrapped
in "X:...:Y".
However, if I use ANSI sequences for color,
SET Esc Char(27)
SET Red Esc + "[0;31m"
SET Nrm Esc + "[0m"
FSET calprefix(x) Red
FSET calsuffix(x) Nrm
MSG "this is a very important thing"
things go all bonkers. My intuition says that remind is calculating
the length of the string (+7 for the prefix, +4 for the suffix) and
using that to align the grid, but by my strings are 11 chars longer
than the actual output. I know bash lets me wrap stuff in my $PS1
with
\[{non printing stuff here\]
to tell it to discount the length of anything in between. Is there
something similar for remind? Or some other way to do this that I've
missed?
Thanks!
-tim
More information about the Remind-fans
mailing list