[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.101 and 1.102

version 1.101, 2017/02/09 15:04:53 version 1.102, 2017/03/08 13:36:12
Line 78 
Line 78 
         char                   **argv, *cause, *cp;          char                   **argv, *cause, *cp;
         int                      detached, already_attached, idx, argc;          int                      detached, already_attached, idx, argc;
         u_int                    sx, sy;          u_int                    sx, sy;
         struct format_tree      *ft;  
         struct environ_entry    *envent;          struct environ_entry    *envent;
         struct cmd_find_state    fs;          struct cmd_find_state    fs;
   
Line 155 
Line 154 
   
         /* Get the new session working directory. */          /* Get the new session working directory. */
         if (args_has(args, 'c')) {          if (args_has(args, 'c')) {
                 ft = format_create(item, FORMAT_NONE, 0);                  cwd = args_get(args, 'c');
                 format_defaults(ft, c, NULL, NULL, NULL);                  to_free = cwd = format_single(item, cwd, c, NULL, NULL, NULL);
                 to_free = cwd = format_expand(ft, args_get(args, 'c'));  
                 format_free(ft);  
         } else if (c != NULL && c->session == NULL && c->cwd != NULL)          } else if (c != NULL && c->session == NULL && c->cwd != NULL)
                 cwd = c->cwd;                  cwd = c->cwd;
         else          else
Line 322 
Line 319 
         if (args_has(args, 'P')) {          if (args_has(args, 'P')) {
                 if ((template = args_get(args, 'F')) == NULL)                  if ((template = args_get(args, 'F')) == NULL)
                         template = NEW_SESSION_TEMPLATE;                          template = NEW_SESSION_TEMPLATE;
                   cp = format_single(item, template, c, s, NULL, NULL);
                 ft = format_create(item, FORMAT_NONE, 0);  
                 format_defaults(ft, c, s, NULL, NULL);  
   
                 cp = format_expand(ft, template);  
                 cmdq_print(item, "%s", cp);                  cmdq_print(item, "%s", cp);
                 free(cp);                  free(cp);
   
                 format_free(ft);  
         }          }
   
         if (!detached)          if (!detached)

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102