From c48d09ec8870ac218d6cc2bbec638d59839eda27 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 25 Apr 2017 15:35:10 +0000 Subject: Do not update TERM into config file parsing has finished. --- environ.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'environ.c') diff --git a/environ.c b/environ.c index 868324ed..d884330e 100644 --- a/environ.c +++ b/environ.c @@ -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; -- cgit