=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-command-prompt.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- src/usr.bin/tmux/cmd-command-prompt.c 2016/10/10 21:51:39 1.34 +++ src/usr.bin/tmux/cmd-command-prompt.c 2016/10/11 07:23:34 1.35 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.34 2016/10/10 21:51:39 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.35 2016/10/11 07:23:34 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -38,8 +38,8 @@ .name = "command-prompt", .alias = NULL, - .args = { "I:p:t:", 0, 1 }, - .usage = "[-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " + .args = { "1I:p:t:", 0, 1 }, + .usage = "[-1] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " "[template]", .tflag = CMD_CLIENT, @@ -67,6 +67,7 @@ struct client *c = cmdq->state.c; char *prompt, *ptr, *input = NULL; size_t n; + int flags; if (c->prompt_string != NULL) return (CMD_RETURN_NORMAL); @@ -108,8 +109,11 @@ input = strsep(&cdata->next_input, ","); } + flags = 0; + if (args_has(args, '1')) + flags |= PROMPT_SINGLE; status_prompt_set(c, prompt, input, cmd_command_prompt_callback, - cmd_command_prompt_free, cdata, 0); + cmd_command_prompt_free, cdata, flags); free(prompt); return (CMD_RETURN_NORMAL);