Scrub multiplexer variables from the child environment
A new st window is never inside tmux/screen/zellij, even when st was launched from one. Programs like kitten icat check TMUX to decide whether to wrap escape codes in a DCS passthrough, which then fails because st is not tmux.
This commit is contained in:
parent
90f40ce703
commit
6499e88485
10
st.c
10
st.c
@ -909,6 +909,16 @@ execsh(char *cmd, char **args)
|
|||||||
unsetenv("COLUMNS");
|
unsetenv("COLUMNS");
|
||||||
unsetenv("LINES");
|
unsetenv("LINES");
|
||||||
unsetenv("TERMCAP");
|
unsetenv("TERMCAP");
|
||||||
|
/*
|
||||||
|
* A new st window is never inside a multiplexer, even when st itself
|
||||||
|
* was launched from one. Programs such as kitten icat use these to
|
||||||
|
* decide whether to wrap escape codes for tmux, which breaks them.
|
||||||
|
*/
|
||||||
|
unsetenv("TMUX");
|
||||||
|
unsetenv("TMUX_PANE");
|
||||||
|
unsetenv("STY");
|
||||||
|
unsetenv("ZELLIJ");
|
||||||
|
unsetenv("ZELLIJ_SESSION_NAME");
|
||||||
setenv("LOGNAME", pw->pw_name, 1);
|
setenv("LOGNAME", pw->pw_name, 1);
|
||||||
setenv("USER", pw->pw_name, 1);
|
setenv("USER", pw->pw_name, 1);
|
||||||
setenv("SHELL", sh, 1);
|
setenv("SHELL", sh, 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user