=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-command-prompt.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- src/usr.bin/tmux/cmd-command-prompt.c 2017/04/19 12:44:29 1.42 +++ src/usr.bin/tmux/cmd-command-prompt.c 2017/04/22 10:22:39 1.43 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.42 2017/04/19 12:44:29 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.43 2017/04/22 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -43,8 +43,6 @@ .usage = "[-1Ni] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " "[template]", - .tflag = CMD_CLIENT, - .flags = 0, .exec = cmd_command_prompt_exec }; @@ -69,9 +67,12 @@ struct args *args = self->args; const char *inputs, *prompts; struct cmd_command_prompt_cdata *cdata; - struct client *c = item->state.c; + struct client *c; char *prompt, *ptr, *input = NULL; size_t n; + + if ((c = cmd_find_client(item, args_get(args, 't'), 0)) == NULL) + return (CMD_RETURN_ERROR); if (c->prompt_string != NULL) return (CMD_RETURN_NORMAL);