Make update-environment an array as well.

This commit is contained in:
nicm
2017-01-24 20:15:32 +00:00
parent b77dd75b57
commit 4b2821ff98
7 changed files with 30 additions and 48 deletions

View File

@ -53,7 +53,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
struct client *c = state->c;
struct session *s = item->state.tflag.s;
struct window_pane *wp;
const char *tablename, *update;
const char *tablename;
struct key_table *table;
if (args_has(args, 'r'))
@ -102,10 +102,8 @@ cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
}
}
if (!args_has(args, 'E')) {
update = options_get_string(s->options, "update-environment");
environ_update(update, c->environ, s->environ);
}
if (!args_has(args, 'E'))
environ_update(s->options, c->environ, s->environ);
if (c->session != NULL && c->session != s)
c->last_session = c->session;