[BACK]Return to cmd-new-session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-new-session.c between version 1.104 and 1.105

version 1.104, 2017/04/22 08:56:24 version 1.105, 2017/04/22 10:22:39
Line 44 
Line 44 
                  "[-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
Line 57 
Line 57 
         .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
Line 108 
Line 108 
                                  * 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);
Line 121 
Line 121 
         /* 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);

Legend:
Removed from v.1.104  
changed lines
  Added in v.1.105