diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-04-25 15:35:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-04-25 15:35:11 +0000 |
commit | a4202f86c2c268311e8d56ecdbd11b392086bb43 (patch) | |
tree | 43d916fa5a04f93d4c9a9f0d32653b97765eb094 /usr.bin/tmux/environ.c | |
parent | bfaa2541e0dc2d8de9491ed27f2144ec70a82d78 (diff) |
Do not update TERM into config file parsing has finished.
Diffstat (limited to 'usr.bin/tmux/environ.c')
-rw-r--r-- | usr.bin/tmux/environ.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/environ.c b/usr.bin/tmux/environ.c index eec2a65f30d..5751ab88a63 100644 --- a/usr.bin/tmux/environ.c +++ b/usr.bin/tmux/environ.c @@ -1,4 +1,4 @@ -/* $OpenBSD: environ.c,v 1.18 2017/03/09 17:02:38 nicm Exp $ */ +/* $OpenBSD: environ.c,v 1.19 2017/04/25 15:35:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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; |