diff options
author | 2020-05-16 15:16:36 +0000 | |
---|---|---|
committer | 2020-05-16 15:16:36 +0000 | |
commit | 37a3aee2ece7d35250a09a2ec42437d3655c5cf4 (patch) | |
tree | db1e8360622ffd1762a766ece15b5d8b906850ab /usr.bin/tmux/cmd-command-prompt.c | |
parent | Copy mode search improvements: (diff) | |
download | wireguard-openbsd-37a3aee2ece7d35250a09a2ec42437d3655c5cf4.tar.xz wireguard-openbsd-37a3aee2ece7d35250a09a2ec42437d3655c5cf4.zip |
Add -W and -T flags to command-prompt to only complete a window and a
target, also complete aliases.
Diffstat (limited to 'usr.bin/tmux/cmd-command-prompt.c')
-rw-r--r-- | usr.bin/tmux/cmd-command-prompt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c index b5eeed79c0d..0a78ae8854c 100644 --- a/usr.bin/tmux/cmd-command-prompt.c +++ b/usr.bin/tmux/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.51 2020/04/13 20:51:57 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.52 2020/05/16 15:16:36 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -40,8 +40,8 @@ const struct cmd_entry cmd_command_prompt_entry = { .name = "command-prompt", .alias = NULL, - .args = { "1kiI:Np:t:", 0, 1 }, - .usage = "[-1kiN] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " + .args = { "1kiI:Np:Tt:W", 0, 1 }, + .usage = "[-1kiNTW] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " "[template]", .flags = CMD_CLIENT_TFLAG, @@ -121,6 +121,10 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item) cdata->flags |= PROMPT_INCREMENTAL; else if (args_has(args, 'k')) cdata->flags |= PROMPT_KEY; + else if (args_has(args, 'W')) + cdata->flags |= PROMPT_WINDOW; + else if (args_has(args, 'T')) + cdata->flags |= PROMPT_TARGET; status_prompt_set(tc, prompt, input, cmd_command_prompt_callback, cmd_command_prompt_free, cdata, cdata->flags); free(prompt); |