Do not update TERM into config file parsing has finished.

This commit is contained in:
nicm
2017-04-25 15:35:10 +00:00
parent 4a51a9d9d5
commit c48d09ec88
7 changed files with 16 additions and 9 deletions

7
job.c
View File

@ -55,7 +55,12 @@ job_run(const char *cmd, struct session *s, const char *cwd,
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, out) != 0)
return (NULL);
env = environ_for_session(s);
/*
* Do not set TERM during .tmux.conf, it is nice to be able to use
* if-shell to decide on default-terminal based on outside TERM.
*/
env = environ_for_session(s, !cfg_finished);
switch (pid = fork()) {
case -1:
environ_free(env);