summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-choose-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-12-14 00:31:55 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-12-14 00:31:55 +0000
commit2022217c9daeafa8716f908857f5b55629372f02 (patch)
tree0fe0eb9fb6e772b2630db05b1e228e9279b56dbb /usr.bin/tmux/cmd-choose-tree.c
parenta3613e1df5562bf010ff3c6a1bc49fd8dd2f44c6 (diff)
Instead of combined flags for -c, -s, -t, split into different sets
using an enum and simplify the parsing code.
Diffstat (limited to 'usr.bin/tmux/cmd-choose-tree.c')
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index b6ad37a6cf0..e29e28cf6d4 100644
--- a/usr.bin/tmux/cmd-choose-tree.c
+++ b/usr.bin/tmux/cmd-choose-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-tree.c,v 1.30 2015/12/13 21:53:57 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.31 2015/12/14 00:31:54 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -51,7 +51,9 @@ const struct cmd_entry cmd_choose_tree_entry = {
.usage = "[-suw] [-b session-template] [-c window template] "
"[-S format] [-W format] " CMD_TARGET_WINDOW_USAGE,
- .flags = CMD_WINDOW_T,
+ .tflag = CMD_WINDOW,
+
+ .flags = 0,
.exec = cmd_choose_tree_exec
};
@@ -60,10 +62,11 @@ const struct cmd_entry cmd_choose_session_entry = {
.alias = NULL,
.args = { "F:t:", 0, 1 },
-
.usage = CMD_TARGET_WINDOW_USAGE " [-F format] [template]",
- .flags = CMD_WINDOW_T,
+ .tflag = CMD_WINDOW,
+
+ .flags = 0,
.exec = cmd_choose_tree_exec
};
@@ -74,7 +77,9 @@ const struct cmd_entry cmd_choose_window_entry = {
.args = { "F:t:", 0, 1 },
.usage = CMD_TARGET_WINDOW_USAGE "[-F format] [template]",
- .flags = CMD_WINDOW_T,
+ .tflag = CMD_WINDOW,
+
+ .flags = 0,
.exec = cmd_choose_tree_exec
};