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

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

version 1.57, 2018/03/08 08:09:10 version 1.58, 2018/05/24 09:42:49
Line 73 
Line 73 
         struct session                  *s = item->target.s;          struct session                  *s = item->target.s;
         struct winlink                  *wl = item->target.wl;          struct winlink                  *wl = item->target.wl;
         struct window_pane              *wp = item->target.wp;          struct window_pane              *wp = item->target.wp;
         const char                      *cwd;  
   
         if (item->client != NULL && item->client->session == NULL)  
                 cwd = item->client->cwd;  
         else if (s != NULL)  
                 cwd = s->cwd;  
         else  
                 cwd = NULL;  
   
         shellcmd = format_single(item, args->argv[0], c, s, wl, wp);          shellcmd = format_single(item, args->argv[0], c, s, wl, wp);
         if (args_has(args, 'F')) {          if (args_has(args, 'F')) {
                 cmd = NULL;                  cmd = NULL;
Line 128 
Line 120 
                 cdata->item = NULL;                  cdata->item = NULL;
         memcpy(&cdata->mouse, &shared->mouse, sizeof cdata->mouse);          memcpy(&cdata->mouse, &shared->mouse, sizeof cdata->mouse);
   
         job_run(shellcmd, s, cwd, NULL, cmd_if_shell_callback,          job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL,
             cmd_if_shell_free, cdata, 0);              cmd_if_shell_callback, cmd_if_shell_free, cdata, 0);
         free(shellcmd);          free(shellcmd);
   
         if (args_has(args, 'b'))          if (args_has(args, 'b'))

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