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 --- generate-version.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'generate-version.sh') diff --git a/generate-version.sh b/generate-version.sh index 3772008b..a030d512 100755 --- a/generate-version.sh +++ b/generate-version.sh @@ -41,7 +41,6 @@ patch=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\3/') extra=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)(-([0-9]+-g[a-z0-9]+) .*)?.*/\5/') new_version="#define FOOT_VERSION \"${new_version}\" -#define FOOT_VERSION_SHORT \"${git_version:-${default_version}}\" #define FOOT_MAJOR ${major} #define FOOT_MINOR ${minor} #define FOOT_PATCH ${patch} -- cgit v1.3