aboutsummaryrefslogtreecommitdiff
path: root/cmd-if-shell.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-14 00:01:41 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-14 00:01:41 +0100
commit653a159225609f7e5efb45bc78cdf7b480d7ef93 (patch)
treede075bcb7fdbd8a3fbd9f800c3a04c63cfdfac6b /cmd-if-shell.c
parent2159ff3256df4b823dfaed24e64047249cf079c2 (diff)
parentfc83517913c8280c222a6cf78ca7fb8053421b37 (diff)
downloadrtmux-653a159225609f7e5efb45bc78cdf7b480d7ef93.tar.gz
rtmux-653a159225609f7e5efb45bc78cdf7b480d7ef93.tar.bz2
rtmux-653a159225609f7e5efb45bc78cdf7b480d7ef93.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r--cmd-if-shell.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c
index 75f462ad..d980472a 100644
--- a/cmd-if-shell.c
+++ b/cmd-if-shell.c
@@ -67,12 +67,12 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
struct cmd_if_shell_data *cdata;
char *shellcmd, *cmd, *error;
const char *file;
- struct client *c = cmd_find_client(item, NULL, 1);
+ struct client *tc = cmdq_get_target_client(item);
struct session *s = target->s;
struct cmd_parse_input pi;
enum cmd_parse_status status;
- shellcmd = format_single_from_target(item, args->argv[0], c);
+ shellcmd = format_single_from_target(item, args->argv[0]);
if (args_has(args, 'F')) {
if (*shellcmd != '0' && *shellcmd != '\0')
cmd = args->argv[1];
@@ -87,7 +87,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
memset(&pi, 0, sizeof pi);
cmd_get_source(self, &pi.file, &pi.line);
pi.item = item;
- pi.c = c;
+ pi.c = tc;
cmd_find_copy_state(&pi.fs, target);
status = cmd_parse_and_insert(cmd, &pi, item, state, &error);
@@ -110,7 +110,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
if (!args_has(args, 'b'))
cdata->client = cmdq_get_client(item);
else
- cdata->client = c;
+ cdata->client = tc;
if (cdata->client != NULL)
cdata->client->references++;
@@ -123,7 +123,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
cmd_get_source(self, &file, &cdata->input.line);
if (file != NULL)
cdata->input.file = xstrdup(file);
- cdata->input.c = c;
+ cdata->input.c = tc;
if (cdata->input.c != NULL)
cdata->input.c->references++;
cmd_find_copy_state(&cdata->input.fs, target);