mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Only set default for TerminalHyperlinks if it hasn't explicitly been set
(for example, with '-i$TerminalHyperlinks=n')
This commit is contained in:
@@ -174,7 +174,7 @@ EXTERN INIT( char *Location, LOCATION);
|
||||
/* Support hyperlinks in terminal emulators?
|
||||
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
||||
*/
|
||||
EXTERN INIT( int TerminalHyperlinks, 0);
|
||||
EXTERN INIT( int TerminalHyperlinks, -1);
|
||||
/* UTC calculation stuff */
|
||||
EXTERN INIT( int MinsFromUTC, 0);
|
||||
EXTERN INIT( int CalculateUTC, 1);
|
||||
|
||||
@@ -851,8 +851,12 @@ void InitRemind(int argc, char const *argv[])
|
||||
}
|
||||
|
||||
/* If stdout is a tty, enable terminal hyperlinks by default */
|
||||
if (isatty(STDOUT_FILENO)) {
|
||||
TerminalHyperlinks = 1;
|
||||
if (TerminalHyperlinks == -1) {
|
||||
if (isatty(STDOUT_FILENO)) {
|
||||
TerminalHyperlinks = 1;
|
||||
} else {
|
||||
TerminalHyperlinks = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user