summaryrefslogtreecommitdiffstats
path: root/job.c
diff options
context:
space:
mode:
authornicm <nicm>2017-04-25 15:35:10 +0000
committernicm <nicm>2017-04-25 15:35:10 +0000
commitc48d09ec8870ac218d6cc2bbec638d59839eda27 (patch)
tree6fa9eb5674abcad38ddc108802b9cb80c793f222 /job.c
parent4a51a9d9d5b43f6b576692f9ce5f5ccfa425f806 (diff)
Do not update TERM into config file parsing has finished.
Diffstat (limited to 'job.c')
-rw-r--r--job.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/job.c b/job.c
index caf5db52..7065a671 100644
--- a/job.c
+++ b/job.c
@@ -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);