[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.51 and 1.52

version 1.51, 2013/10/10 12:00:21 version 1.52, 2013/10/10 12:07:36
Line 34 
Line 34 
   
 const struct cmd_entry cmd_new_session_entry = {  const struct cmd_entry cmd_new_session_entry = {
         "new-session", "new",          "new-session", "new",
         "AdDF:n:Ps:t:x:y:", 0, 1,          "Ac:dDF:n:Ps:t:x:y:", 0, 1,
         "[-AdDP] [-F format] [-n window-name] [-s session-name] "          "[-AdDP] [-c start-directory] [-F format] [-n window-name] "
         CMD_TARGET_SESSION_USAGE " [-x width] [-y height] [command]",          "[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] [-y height] "
           "[command]",
         CMD_STARTSERVER|CMD_CANTNEST|CMD_SENDENVIRON,          CMD_STARTSERVER|CMD_CANTNEST|CMD_SENDENVIRON,
         NULL,          NULL,
         cmd_new_session_exec          cmd_new_session_exec
Line 52 
Line 53 
         struct environ           env;          struct environ           env;
         struct termios           tio, *tiop;          struct termios           tio, *tiop;
         struct passwd           *pw;          struct passwd           *pw;
         const char              *newname, *target, *update, *cwd, *errstr;          const char              *newname, *target, *update, *base, *cwd;
         const char              *template;          const char              *errstr, *template;
         char                    *cmd, *cause, *cp;          char                    *cmd, *cause, *cp;
         int                      detached, idx;          int                      detached, idx;
         u_int                    sx, sy;          u_int                    sx, sy;
Line 126 
Line 127 
   
         /* Get the new session working directory. */          /* Get the new session working directory. */
         if (c != NULL && c->cwd != NULL)          if (c != NULL && c->cwd != NULL)
                 cwd = c->cwd;                  base = c->cwd;
         else {          else {
                 pw = getpwuid(getuid());                  pw = getpwuid(getuid());
                 if (pw->pw_dir != NULL && *pw->pw_dir != '\0')                  if (pw->pw_dir != NULL && *pw->pw_dir != '\0')
                         cwd = pw->pw_dir;                          base = pw->pw_dir;
                 else                  else
                         cwd = "/";                          base = "/";
         }          }
           if (args_has(args, 'c'))
                   cwd = args_get(args, 'c');
           else
                   cwd = options_get_string(&global_s_options, "default-path");
           cwd = cmd_default_path(base, base, cwd);
   
         /* Find new session size. */          /* Find new session size. */
         if (c != NULL) {          if (c != NULL) {

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52