summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-list-windows.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-04-22 10:22:40 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-04-22 10:22:40 +0000
commit3b5031a1e691e18e1bbe892b262d81db17887237 (patch)
tree280122dc6016981c484998db1ba10afbfdadb998 /usr.bin/tmux/cmd-list-windows.c
parent61be04363b84fafcbfe17c4d58547b1ca814e2c7 (diff)
Get rid of the extra layer of flags and cmd_prepare() and just store the
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
Diffstat (limited to 'usr.bin/tmux/cmd-list-windows.c')
-rw-r--r--usr.bin/tmux/cmd-list-windows.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-list-windows.c b/usr.bin/tmux/cmd-list-windows.c
index 1daf04a65a5..fa4572a6321 100644
--- a/usr.bin/tmux/cmd-list-windows.c
+++ b/usr.bin/tmux/cmd-list-windows.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-windows.c,v 1.41 2017/02/03 11:57:27 nicm Exp $ */
+/* $OpenBSD: cmd-list-windows.c,v 1.42 2017/04/22 10:22:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -52,7 +52,7 @@ const struct cmd_entry cmd_list_windows_entry = {
.args = { "F:at:", 0, 0 },
.usage = "[-a] [-F format] " CMD_TARGET_SESSION_USAGE,
- .tflag = CMD_SESSION,
+ .target = { 't', CMD_FIND_SESSION, 0 },
.flags = CMD_AFTERHOOK,
.exec = cmd_list_windows_exec
@@ -66,7 +66,7 @@ cmd_list_windows_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'a'))
cmd_list_windows_server(self, item);
else
- cmd_list_windows_session(self, item->state.tflag.s, item, 0);
+ cmd_list_windows_session(self, item->target.s, item, 0);
return (CMD_RETURN_NORMAL);
}