diff options
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/cmd-attach-session.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-switch-client.c | 4 |
2 files changed, 9 insertions, 3 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); diff --git a/usr.bin/tmux/cmd-switch-client.c b/usr.bin/tmux/cmd-switch-client.c index 8d15fefd55b..367c3e38bc1 100644 --- a/usr.bin/tmux/cmd-switch-client.c +++ b/usr.bin/tmux/cmd-switch-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-switch-client.c,v 1.26 2015/06/07 21:39:39 nicm Exp $ */ +/* $OpenBSD: cmd-switch-client.c,v 1.27 2015/07/06 14:24:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -119,7 +119,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq) } } - if (c != NULL && s != c->session && !args_has(args, 'E')) { + if (c != NULL && !args_has(args, 'E')) { update = options_get_string(&s->options, "update-environment"); environ_update(update, &c->environ, &s->environ); } |