Allow the initial context on prompts to be set with the new -I option to

command-prompt. From Tiago Cunha.
This commit is contained in:
Nicholas Marriott
2011-07-02 21:05:44 +00:00
parent 1202284f37
commit ad60a2c952
5 changed files with 73 additions and 24 deletions

View File

@ -87,9 +87,8 @@ cmd_confirm_before_exec(struct cmd *self, struct cmd_ctx *ctx)
cdata = xmalloc(sizeof *cdata);
cdata->cmd = xstrdup(args->argv[0]);
cdata->c = c;
status_prompt_set(cdata->c, buf,
cmd_confirm_before_callback, cmd_confirm_before_free, cdata,
PROMPT_SINGLE);
status_prompt_set(cdata->c, buf, NULL, cmd_confirm_before_callback,
cmd_confirm_before_free, cdata, PROMPT_SINGLE);
xfree(buf);
return (1);