summaryrefslogtreecommitdiffstats
path: root/cmd-if-shell.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-13 06:50:42 +0000
committernicm <nicm>2021-08-13 06:50:42 +0000
commita2b85069171413aa30c812d44bf8ee4d32a2f834 (patch)
tree8239a57c3ef6901d5ff14445ece8cbea12c3bf55 /cmd-if-shell.c
parente2f6f58fe50e233dcd0d924bd30c94d1161c666d (diff)
Set return code for confirm-before and make command-prompt also block,
GitHub issue 2822.
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r--cmd-if-shell.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c
index 65fbf19b..f4c81074 100644
--- a/cmd-if-shell.c
+++ b/cmd-if-shell.c
@@ -104,8 +104,6 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
cdata->cmd_if = xstrdup(args->argv[1]);
if (args->argc == 3)
cdata->cmd_else = xstrdup(args->argv[2]);
- else
- cdata->cmd_else = NULL;
if (!args_has(args, 'b'))
cdata->client = cmdq_get_client(item);
@@ -116,10 +114,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
if (!args_has(args, 'b'))
cdata->item = item;
- else
- cdata->item = NULL;
- memset(&cdata->input, 0, sizeof cdata->input);
cmd_get_source(self, &file, &cdata->input.line);
if (file != NULL)
cdata->input.file = xstrdup(file);