summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-attach-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-attach-session.c')
-rw-r--r--usr.bin/tmux/cmd-attach-session.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c
index 968cf6ac0b5..ca5306a4036 100644
--- a/usr.bin/tmux/cmd-attach-session.c
+++ b/usr.bin/tmux/cmd-attach-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-attach-session.c,v 1.37 2015/06/09 07:07:06 nicm Exp $ */
+/* $OpenBSD: cmd-attach-session.c,v 1.38 2015/07/06 14:24:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -126,6 +126,12 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
s->cwd = fd;
}
+ if (!Eflag) {
+ update = options_get_string(&s->options,
+ "update-environment");
+ environ_update(update, &c->environ, &s->environ);
+ }
+
c->session = s;
notify_attached_session_changed(c);
session_update_activity(s);