From a2f765b72a6612758a034a5b0c24ec08625db1a3 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 12 May 2023 14:55:55 +0200 Subject: slave: unset TERM_PROGRAM{,_VERSION} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foot’s policy is to not set environment variables that identifies it (except the well-known and established `TERM` variable). We encourage applications to use terminfo to determine capabilities, or terminal queries, when available. Or, at least use terminal queries to detect the terminal and its version. Setting environment variables is a bad idea since they are inherited by all applications started by the terminal (which is the whole point). But, this includes other terminal emulators, making it very possible a terminal emulator gets mis-detected just because it was started from another terminal. Since there are a couple of terminal emulators that _do_ set TERM_PROGRAM and TERM_PROGRAM_VERSION, unset these environment variables to avoid being misdetected. Closes #1349 --- doc/foot.1.scd | 11 ----------- doc/footclient.1.scd | 11 ----------- 2 files changed, 22 deletions(-) (limited to 'doc') diff --git a/doc/foot.1.scd b/doc/foot.1.scd index 51c53130..6f63d4c8 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -546,17 +546,6 @@ In all other cases, the exit code is that of the client application This variable is set to *truecolor*, to indicate to client applications that 24-bit RGB colors are supported. -*TERM_PROGRAM* - Always set to *foot*. This can be used by client applications to - check which terminal is in use, but with the caveat that it may - have been inherited from a parent process in other terminals that - aren't known to set the variable. - -*TERM_PROGRAM_VERSION* - Set to the foot version string, in the format _major_*.*_minor_*.*_patch_ - or _major_*.*_minor_*.*_patch_*-*_revision_*-\g*_commit_ for inter-release - builds. The same caveat as for *TERM_PROGRAM* applies. - In addition to the variables listed above, custom environment variables may be defined in *foot.ini*(5). diff --git a/doc/footclient.1.scd b/doc/footclient.1.scd index 189d9e3c..63235134 100644 --- a/doc/footclient.1.scd +++ b/doc/footclient.1.scd @@ -158,17 +158,6 @@ terminfo entries manually, by copying *foot* and *foot-direct* to This variable is set to *truecolor*, to indicate to client applications that 24-bit RGB colors are supported. -*TERM_PROGRAM* - Always set to *foot*. This can be used by client applications to - check which terminal is in use, but with the caveat that it may - have been inherited from a parent process in other terminals that - aren't known to set the variable. - -*TERM_PROGRAM_VERSION* - Set to the foot version string, in the format _major_*.*_minor_*.*_patch_ - or _major_*.*_minor_*.*_patch_*-*_revision_*-\g*_commit_ for inter-release - builds. The same caveat as for *TERM_PROGRAM* applies. - In addition to the variables listed above, custom environment variables may be defined in *foot.ini*(5). -- cgit v1.3