version 1.85, 2016/01/31 09:52:01 |
version 1.86, 2016/02/04 14:11:20 |
|
|
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
struct client *c = cmdq->client; |
struct client *c = cmdq->client; |
struct session *s, *attach_sess; |
struct session *s, *as; |
struct session *groupwith = cmdq->state.tflag.s; |
struct session *groupwith = cmdq->state.tflag.s; |
struct window *w; |
struct window *w; |
struct environ *env; |
struct environ *env; |
|
|
cmdq_error(cmdq, "bad session name: %s", newname); |
cmdq_error(cmdq, "bad session name: %s", newname); |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
} |
} |
if ((attach_sess = session_find(newname)) != NULL) { |
if ((as = session_find(newname)) != NULL) { |
if (args_has(args, 'A')) { |
if (args_has(args, 'A')) { |
/* |
/* |
* This cmdq is now destined for |
* This cmdq is now destined for |
|
|
* will have already been prepared, copy this |
* will have already been prepared, copy this |
* session into its tflag so it can be used. |
* session into its tflag so it can be used. |
*/ |
*/ |
cmdq->state.tflag.s = attach_sess; |
cmd_find_from_session(&cmdq->state.tflag, as); |
return (cmd_attach_session(cmdq, |
return (cmd_attach_session(cmdq, |
args_has(args, 'D'), 0, NULL, |
args_has(args, 'D'), 0, NULL, |
args_has(args, 'E'))); |
args_has(args, 'E'))); |