=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-run-shell.c,v retrieving revision 1.65 retrieving revision 1.66 diff -c -r1.65 -r1.66 *** src/usr.bin/tmux/cmd-run-shell.c 2020/04/13 08:26:27 1.65 --- src/usr.bin/tmux/cmd-run-shell.c 2020/04/13 10:59:58 1.66 *************** *** 1,4 **** ! /* $OpenBSD: cmd-run-shell.c,v 1.65 2020/04/13 08:26:27 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha --- 1,4 ---- ! /* $OpenBSD: cmd-run-shell.c,v 1.66 2020/04/13 10:59:58 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha *************** *** 90,100 **** cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); struct cmd_run_shell_data *cdata; struct client *c = cmd_find_client(item, NULL, 1); ! struct session *s = item->target.s; ! struct winlink *wl = item->target.wl; ! struct window_pane *wp = item->target.wp; const char *delay; double d; struct timeval tv; --- 90,100 ---- cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); + struct cmd_find_state *target = cmdq_get_target(item); struct cmd_run_shell_data *cdata; struct client *c = cmd_find_client(item, NULL, 1); ! struct session *s = target->s; ! struct window_pane *wp = target->wp; const char *delay; double d; struct timeval tv; *************** *** 102,108 **** cdata = xcalloc(1, sizeof *cdata); if (args->argc != 0) ! cdata->cmd = format_single(item, args->argv[0], c, s, wl, wp); if (args_has(args, 't') && wp != NULL) cdata->wp_id = wp->id; --- 102,108 ---- cdata = xcalloc(1, sizeof *cdata); if (args->argc != 0) ! cdata->cmd = format_single_from_target(item, args->argv[0], c); if (args_has(args, 't') && wp != NULL) cdata->wp_id = wp->id; *************** *** 112,118 **** if (!args_has(args, 'b')) cdata->item = item; ! cdata->cwd = xstrdup(server_client_get_cwd(item->client, s)); cdata->s = s; if (s != NULL) session_add_ref(s, __func__); --- 112,118 ---- if (!args_has(args, 'b')) cdata->item = item; ! cdata->cwd = xstrdup(server_client_get_cwd(cmdq_get_client(item), s)); cdata->s = s; if (s != NULL) session_add_ref(s, __func__); *************** *** 197,204 **** free(msg); if (item != NULL) { ! if (item->client != NULL && item->client->session == NULL) ! item->client->retval = retcode; cmdq_continue(item); } } --- 197,205 ---- free(msg); if (item != NULL) { ! if (cmdq_get_client(item) != NULL && ! cmdq_get_client(item)->session == NULL) ! cmdq_get_client(item)->retval = retcode; cmdq_continue(item); } }