mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
slave: set $TERM_PROGRAM and $TERM_PROGRAM_VERSION environment variables
These are already being set by iTerm2, WezTerm, tmux and likely some others. Even though using yet more environment variables seems rather questionable, if we don't set these we run the risk of inheriting them from other terminals. See also: *97a6078df8/sources/PTYSession.m (L2568-2570)*1d0f68dee9/environ.c (L263-L264)* https://github.com/search?q=TERM_PROGRAM&type=code
This commit is contained in:
parent
9f3ce9236f
commit
5b2f02d826
5 changed files with 28 additions and 0 deletions
3
slave.c
3
slave.c
|
|
@ -21,6 +21,7 @@
|
|||
#include "macros.h"
|
||||
#include "terminal.h"
|
||||
#include "tokenize.h"
|
||||
#include "version.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
extern char **environ;
|
||||
|
|
@ -351,6 +352,8 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
|
|||
}
|
||||
|
||||
setenv("TERM", term_env, 1);
|
||||
setenv("TERM_PROGRAM", "foot", 1);
|
||||
setenv("TERM_PROGRAM_VERSION", FOOT_VERSION_SHORT, 1);
|
||||
setenv("COLORTERM", "truecolor", 1);
|
||||
setenv("PWD", cwd, 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue