Applied to OpenBSD now, will be in SF at next sync up. Thanks!
On Wed, Apr 01, 2015 at 11:00:43AM +0100, Si Beaumont wrote: > On Wed, 01 Apr 2015 at 01:24, Thomas Adam wrote: > > On Tue, Mar 31, 2015 at 08:56:15AM +0100, Si Beaumont wrote: > > > + update = options_get_string(&global_s_options, > > > "update-environment"); > > > > I think you want &s->options here, no? > > Ah, yes! Sorry I think I cribbed from the wrong place and what you say is what > happens in the attach command. > > Attached is a revised version of the patch. > > Si > >From b572f6168f98cf8745f210dfe8eaa93ecc3e4704 Mon Sep 17 00:00:00 2001 > From: Si Beaumont <simonjbeaum...@gmail.com> > Date: Thu, 5 Feb 2015 10:28:41 +0000 > Subject: [PATCH] Update environment when switching sessions > > --- > cmd-switch-client.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/cmd-switch-client.c b/cmd-switch-client.c > index d8f7346..a421573 100644 > --- a/cmd-switch-client.c > +++ b/cmd-switch-client.c > @@ -65,7 +65,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq) > struct winlink *wl = NULL; > struct window *w = NULL; > struct window_pane *wp = NULL; > - const char *tflag; > + const char *tflag, *update; > > if ((c = cmd_find_client(cmdq, args_get(args, 'c'), 0)) == NULL) > return (CMD_RETURN_ERROR); > @@ -126,6 +126,14 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q > *cmdq) > } > } > > + /* Update the environment if we're switching clients */ > + if (c != NULL) { > + if (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; > -- > 1.9.1 > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users