-/* $OpenBSD: cmd-switch-client.c,v 1.24 2015/04/25 18:09:28 nicm Exp $ */
+/* $OpenBSD: cmd-switch-client.c,v 1.25 2015/05/07 14:07:16 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
struct winlink *wl = NULL;
struct window *w = NULL;
struct window_pane *wp = NULL;
- const char *tflag, *tablename;
+ const char *tflag, *tablename, *update;
struct key_table *table;
if ((c = cmd_find_client(cmdq, args_get(args, 'c'), 0)) == NULL)
}
}
+ if (c != NULL && s != c->session) {
+ update = options_get_string(&s->options, "update-environment");
+ environ_update(update, &c->environ, &s->environ);
+ }
+
if (c->session != NULL)
c->last_session = c->session;
c->session = s;