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

Diff for /src/usr.bin/tmux/cmd.c between version 1.57 and 1.58

version 1.57, 2011/12/09 16:28:18 version 1.58, 2011/12/27 14:07:20
Line 1221 
Line 1221 
         char                    *cwd;          char                    *cwd;
         struct session          *s;          struct session          *s;
         struct window_pane      *wp;          struct window_pane      *wp;
           struct environ_entry    *envent;
   
         if ((s = cmd_current_session(ctx, 0)) == NULL)          if ((s = cmd_current_session(ctx, 0)) == NULL)
                 return (NULL);                  return (NULL);
   
         cwd = options_get_string(&s->options, "default-path");          cwd = options_get_string(&s->options, "default-path");
           if ((cwd[0] == '~' && cwd[1] == '\0') || !strcmp(cwd, "$HOME")) {
                   envent = environ_find(&global_environ, "HOME");
                   if (envent != NULL && *envent->value != '\0')
                           return envent->value;
                   cwd = "";
           }
         if (*cwd == '\0') {          if (*cwd == '\0') {
                 if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)                  if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
                         return (ctx->cmdclient->cwd);                          return (ctx->cmdclient->cwd);

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58