version 1.104, 2017/04/22 08:56:24 |
version 1.105, 2017/04/22 10:22:39 |
|
|
"[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] " |
"[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] " |
"[-y height] [command]", |
"[-y height] [command]", |
|
|
.tflag = CMD_SESSION_CANFAIL, |
.target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL }, |
|
|
.flags = CMD_STARTSERVER, |
.flags = CMD_STARTSERVER, |
.exec = cmd_new_session_exec |
.exec = cmd_new_session_exec |
|
|
.args = { "t:", 0, 0 }, |
.args = { "t:", 0, 0 }, |
.usage = CMD_TARGET_SESSION_USAGE, |
.usage = CMD_TARGET_SESSION_USAGE, |
|
|
.tflag = CMD_SESSION, |
.target = { 't', CMD_FIND_SESSION, 0 }, |
|
|
.flags = 0, |
.flags = 0, |
.exec = cmd_new_session_exec |
.exec = cmd_new_session_exec |
|
|
* have already been prepared, copy this |
* have already been prepared, copy this |
* session into its tflag so it can be used. |
* session into its tflag so it can be used. |
*/ |
*/ |
cmd_find_from_session(&item->state.tflag, as); |
cmd_find_from_session(&item->target, as); |
return (cmd_attach_session(item, |
return (cmd_attach_session(item, |
args_has(args, 'D'), 0, NULL, |
args_get(args, 't'), args_has(args, 'D'), |
args_has(args, 'E'))); |
0, NULL, args_has(args, 'E'))); |
} |
} |
cmdq_error(item, "duplicate session: %s", newname); |
cmdq_error(item, "duplicate session: %s", newname); |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
|
|
/* Is this going to be part of a session group? */ |
/* Is this going to be part of a session group? */ |
group = args_get(args, 't'); |
group = args_get(args, 't'); |
if (group != NULL) { |
if (group != NULL) { |
groupwith = item->state.tflag.s; |
groupwith = item->target.s; |
if (groupwith == NULL) { |
if (groupwith == NULL) { |
if (!session_check_name(group)) { |
if (!session_check_name(group)) { |
cmdq_error(item, "bad group name: %s", group); |
cmdq_error(item, "bad group name: %s", group); |