diff options
Diffstat (limited to 'cmd-pipe-pane.c')
-rw-r--r-- | cmd-pipe-pane.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/cmd-pipe-pane.c b/cmd-pipe-pane.c index ce1b3d37..b64229d8 100644 --- a/cmd-pipe-pane.c +++ b/cmd-pipe-pane.c @@ -55,11 +55,12 @@ const struct cmd_entry cmd_pipe_pane_entry = { static enum cmd_retval cmd_pipe_pane_exec(struct cmd *self, struct cmdq_item *item) { - struct args *args = self->args; - struct client *c = cmd_find_client(item, NULL, 1); - struct window_pane *wp = item->target.wp; - struct session *s = item->target.s; - struct winlink *wl = item->target.wl; + struct args *args = cmd_get_args(self); + struct cmd_find_state *target = cmdq_get_target(item); + struct client *tc = cmdq_get_target_client(item); + struct window_pane *wp = target->wp; + struct session *s = target->s; + struct winlink *wl = target->wl; char *cmd; int old_fd, pipe_fd[2], null_fd, in, out; struct format_tree *ft; @@ -88,13 +89,13 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmdq_item *item) * * bind ^p pipep -o 'cat >>~/output' */ - if (args_has(self->args, 'o') && old_fd != -1) + if (args_has(args, 'o') && old_fd != -1) return (CMD_RETURN_NORMAL); /* What do we want to do? Neither -I or -O is -O. */ - if (args_has(self->args, 'I')) { + if (args_has(args, 'I')) { in = 1; - out = args_has(self->args, 'O'); + out = args_has(args, 'O'); } else { in = 0; out = 1; @@ -107,8 +108,8 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmdq_item *item) } /* Expand the command. */ - ft = format_create(item->client, item, FORMAT_NONE, 0); - format_defaults(ft, c, s, wl, wp); + ft = format_create(cmdq_get_client(item), item, FORMAT_NONE, 0); + format_defaults(ft, tc, s, wl, wp); cmd = format_expand_time(ft, args->argv[0]); format_free(ft); |