From e2f786580c63bd44800f6ff7458c49e3b04a3f31 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Sat, 10 Jan 2026 10:35:52 -0500 Subject: [PATCH] Make the 'z' flag of the "-c" command-line option work as it did in 06.00.00. --- docs/WHATSNEW | 5 ++--- man/remind.1.in | 4 ++++ src/init.c | 5 +++++ tests/test-rem | 5 ++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/WHATSNEW b/docs/WHATSNEW index d06d79d0..56f4ba44 100644 --- a/docs/WHATSNEW +++ b/docs/WHATSNEW @@ -9,9 +9,8 @@ CHANGES TO REMIND https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda for details. - NOTE INCOMPATIBILITY: $TerminalHyperlinks REPLACES the "z" flag of - the "-c" option (introduced in version 06.02.00), which will no - longer do anything. + For backward compatibility, the 'z' flag of the "-c" command-line + option sets $TerminalHyperlinks to 1. - NEW FEATURE: remind: Add another parameter to the "-w" option to remove blank lines between reminders, thereby making the calendar diff --git a/man/remind.1.in b/man/remind.1.in index e0874131..c4391759 100644 --- a/man/remind.1.in +++ b/man/remind.1.in @@ -102,6 +102,10 @@ flag also enables the use of the UNICODE "left-to-right" mark that can fix up formatting problems with right-to-left languages in the calendar display. .TP +.B 'z' +has the effect of setting the system variable \fB$TerminalHyperlinks\fR +to 1. See the documentation of this variable in the section "SYSTEM VARIABLES" +.TP .B 'c' causes \fBRemind\fR to use VT100 escape sequences to approximate SPECIAL COLOR reminders. Note that this flag is kept for diff --git a/src/init.c b/src/init.c index 8b1ae08d..c347ec4a 100644 --- a/src/init.c +++ b/src/init.c @@ -514,6 +514,11 @@ void InitRemind(int argc, char const *argv[]) arg++; continue; } + if (*arg == 'z' || *arg == 'Z') { + TerminalHyperlinks = 1; + arg++; + continue; + } if (*arg == 'c' || *arg == 'C') { UseVTColors = 1; arg++; diff --git a/tests/test-rem b/tests/test-rem index 60561432..4cc0ccf9 100644 --- a/tests/test-rem +++ b/tests/test-rem @@ -970,9 +970,8 @@ REM 17 INFO "Url: https://dianne.skoll.ca" CAL Hello, linky! REM 18 INFO "Url: https://dianne.skoll.ca" SPECIAL COLOR 255 0 0 Hello, linky! EOF -# Turn off spacing between reminders.. -$REMIND -w,0,0,0 -@2 -c - 1 Jan 2020 <<'EOF' >> $OUT 2>&1 -SET $TerminalHyperlinks 1 +# Turn off spacing between reminders, and test the 'z' -c flag. +$REMIND -w,0,0,0 -@2 -cz - 1 Jan 2020 <<'EOF' >> $OUT 2>&1 REM 15 INFO "Url: https://dianne.skoll.ca" MSG Hello, linky 1! REM 15 INFO "Url: https://dianne.skoll.ca" MSF Hello, linky 2! REM 15 INFO "Url: https://dianne.skoll.ca" CAL Hello, linky 3!