mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
slave: set TERMINFO instead of TERMINFO_DIRS
This seems to be slightly better supported than TERMINFO_DIRS. It also simplifies our code, since it’s no longer an issue of whether to append or not - we just set TERMINFO, and ignore whatever it was set to before. Also closes #687
This commit is contained in:
parent
ee68a3fe95
commit
8a7264e905
3 changed files with 20 additions and 28 deletions
10
slave.c
10
slave.c
|
|
@ -290,15 +290,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
|
|||
setenv("COLORTERM", "truecolor", 1);
|
||||
|
||||
#if defined(FOOT_TERMINFO_PATH)
|
||||
const char *terminfo_dirs = getenv("TERMINFO_DIRS");
|
||||
if (terminfo_dirs != NULL) {
|
||||
char *updated_terminfo_dirs =
|
||||
xasprintf("%s:%s", terminfo_dirs, FOOT_TERMINFO_PATH);
|
||||
|
||||
setenv("TERMINFO_DIRS", updated_terminfo_dirs, 1);
|
||||
free(updated_terminfo_dirs);
|
||||
} else
|
||||
setenv("TERMINFO_DIRS", FOOT_TERMINFO_PATH, 1);
|
||||
setenv("TERMINFO", FOOT_TERMINFO_PATH, 1);
|
||||
#endif
|
||||
|
||||
char **_shell_argv = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue