Pass file/line to new command for if-shell so that errors appear

sensibly.
This commit is contained in:
nicm
2016-10-09 08:06:51 +00:00
parent 48dd250af1
commit 1db6d6fea6
2 changed files with 15 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
shellcmd = format_expand(ft, args->argv[0]);
format_free(ft);
cdata = xmalloc(sizeof *cdata);
cdata = xcalloc(1, sizeof *cdata);
cdata->cmd = shellcmd;
cdata->bflag = args_has(args, 'b');
cdata->wp_id = wp != NULL ? (int) wp->id : -1;