diff --git a/st.c b/st.c index b74c90d..e1eab16 100644 --- a/st.c +++ b/st.c @@ -909,6 +909,16 @@ execsh(char *cmd, char **args) unsetenv("COLUMNS"); unsetenv("LINES"); 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("USER", pw->pw_name, 1); setenv("SHELL", sh, 1);