summaryrefslogtreecommitdiffstats
path: root/cmd-switch-client.c
diff options
context:
space:
mode:
authornicm <nicm>2015-06-07 21:39:39 +0000
committernicm <nicm>2015-06-07 21:39:39 +0000
commitc4e811e51936edab66803a7b9e099ac135e6e19b (patch)
tree8f2d0eb57df2cfc54dc608cf21c133750cfab494 /cmd-switch-client.c
parented6c036ee3192029e9d0a60e8f9bb2a4ccfb99bf (diff)
Add -E flag when attaching or switching client to bypass
update-environment, from Steven Lu.
Diffstat (limited to 'cmd-switch-client.c')
-rw-r--r--cmd-switch-client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-switch-client.c b/cmd-switch-client.c
index 369fc917..23751d73 100644
--- a/cmd-switch-client.c
+++ b/cmd-switch-client.c
@@ -31,8 +31,8 @@ enum cmd_retval cmd_switch_client_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_switch_client_entry = {
"switch-client", "switchc",
- "lc:npt:rT:", 0, 0,
- "[-lnpr] [-c target-client] [-t target-session] [-T key-table]",
+ "lc:Enpt:rT:", 0, 0,
+ "[-Elnpr] [-c target-client] [-t target-session] [-T key-table]",
CMD_READONLY,
cmd_switch_client_exec
};
@@ -119,7 +119,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
}
}
- if (c != NULL && s != c->session) {
+ if (c != NULL && s != c->session && !args_has(args, 'E')) {
update = options_get_string(&s->options, "update-environment");
environ_update(update, &c->environ, &s->environ);
}