Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /cmd-command-prompt.c [2f7ffa] .. [6dec97] Maximize Restore

  Switch to side-by-side view

--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -31,6 +31,7 @@
 
 void	cmd_command_prompt_key_binding(struct cmd *, int);
 enum cmd_retval	cmd_command_prompt_exec(struct cmd *, struct cmd_q *);
+void	cmd_command_prompt_prepare(struct cmd *, struct cmd_q *);
 
 int	cmd_command_prompt_callback(void *, const char *);
 void	cmd_command_prompt_free(void *);
@@ -39,9 +40,10 @@
 	"command-prompt", NULL,
 	"I:p:t:", 0, 1,
 	"[-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " [template]",
-	0,
+	CMD_PREPARECLIENT,
 	cmd_command_prompt_key_binding,
-	cmd_command_prompt_exec
+	cmd_command_prompt_exec,
+	NULL
 };
 
 struct cmd_command_prompt_cdata {
@@ -92,7 +94,7 @@
 	char				*prompt, *ptr, *input = NULL;
 	size_t				 n;
 
-	if ((c = cmd_find_client(cmdq, args_get(args, 't'), 0)) == NULL)
+	if ((c = cmdq->state.c) == NULL)
 		return (CMD_RETURN_ERROR);
 
 	if (c->prompt_string != NULL)