mirror of
https://github.com/tmux/tmux.git
synced 2024-11-10 13:48:48 +00:00
Update environment with -E when attach-session used on an already
attached session or switch-client used on the current session. From Cam Hutchison.
This commit is contained in:
parent
f557c7d8ca
commit
b298478435
@ -126,6 +126,12 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
|
|||||||
s->cwd = fd;
|
s->cwd = fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Eflag) {
|
||||||
|
update = options_get_string(&s->options,
|
||||||
|
"update-environment");
|
||||||
|
environ_update(update, &c->environ, &s->environ);
|
||||||
|
}
|
||||||
|
|
||||||
c->session = s;
|
c->session = s;
|
||||||
notify_attached_session_changed(c);
|
notify_attached_session_changed(c);
|
||||||
session_update_activity(s);
|
session_update_activity(s);
|
||||||
|
@ -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");
|
update = options_get_string(&s->options, "update-environment");
|
||||||
environ_update(update, &c->environ, &s->environ);
|
environ_update(update, &c->environ, &s->environ);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user