summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/environ.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-04-25 15:35:11 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-04-25 15:35:11 +0000
commita4202f86c2c268311e8d56ecdbd11b392086bb43 (patch)
tree43d916fa5a04f93d4c9a9f0d32653b97765eb094 /usr.bin/tmux/environ.c
parentbfaa2541e0dc2d8de9491ed27f2144ec70a82d78 (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.c10
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;