diff options
author | nicm <nicm> | 2017-04-25 15:35:10 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-25 15:35:10 +0000 |
commit | c48d09ec8870ac218d6cc2bbec638d59839eda27 (patch) | |
tree | 6fa9eb5674abcad38ddc108802b9cb80c793f222 /environ.c | |
parent | 4a51a9d9d5b43f6b576692f9ce5f5ccfa425f806 (diff) |
Do not update TERM into config file parsing has finished.
Diffstat (limited to 'environ.c')
-rw-r--r-- | environ.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -222,7 +222,7 @@ environ_log(struct environ *env, const char *prefix) /* Create initial environment for new child. */ struct environ * -environ_for_session(struct session *s) +environ_for_session(struct session *s, int no_TERM) { struct environ *env; const char *value; @@ -233,8 +233,10 @@ environ_for_session(struct session *s) if (s != NULL) environ_copy(s->environ, env); - value = options_get_string(global_options, "default-terminal"); - environ_set(env, "TERM", "%s", value); + if (!no_TERM) { + value = options_get_string(global_options, "default-terminal"); + environ_set(env, "TERM", "%s", value); + } if (s != NULL) idx = s->id; |