summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-05-16 15:40:45 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-05-16 15:40:45 +0000
commited78dbf69153869c0ec2d4b51f72e9d8020ece3d (patch)
tree0f1a5499ecca4acd4665cb372b9f242091b6a79a
parent04b60dccecdc5b6aeb47eb6021b44be3a851d734 (diff)
Export TERM_PROGRAM and TERM_PROGRAM_VERSION like various other
terminals.
-rw-r--r--usr.bin/tmux/environ.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/environ.c b/usr.bin/tmux/environ.c
index 323a4025a83..34251b4db90 100644
--- a/usr.bin/tmux/environ.c
+++ b/usr.bin/tmux/environ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: environ.c,v 1.24 2020/03/31 17:14:40 nicm Exp $ */
+/* $OpenBSD: environ.c,v 1.25 2020/05/16 15:40:44 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -252,6 +252,8 @@ environ_for_session(struct session *s, int no_TERM)
if (!no_TERM) {
value = options_get_string(global_options, "default-terminal");
environ_set(env, "TERM", 0, "%s", value);
+ environ_set(env, "TERM_PROGRAM", 0, "%s", "tmux");
+ environ_set(env, "TERM_PROGRAM_VERSION", 0, "%s", getversion());
}
if (s != NULL)