summaryrefslogtreecommitdiffstats
path: root/cmd-select-window.c
diff options
context:
space:
mode:
authornicm <nicm>2015-12-14 00:31:54 +0000
committernicm <nicm>2015-12-14 00:31:54 +0000
commita3129fd4e820d7ccb3797fed491e7c021b63c568 (patch)
tree2670410ce357adf7dee1ace4f33d88f034b2ec12 /cmd-select-window.c
parentecfeee2e8255a77f82a07124c93c8dbc7683c421 (diff)
Instead of combined flags for -c, -s, -t, split into different sets
using an enum and simplify the parsing code.
Diffstat (limited to 'cmd-select-window.c')
-rw-r--r--cmd-select-window.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/cmd-select-window.c b/cmd-select-window.c
index 9b396cf9..82acc859 100644
--- a/cmd-select-window.c
+++ b/cmd-select-window.c
@@ -35,7 +35,9 @@ const struct cmd_entry cmd_select_window_entry = {
.args = { "lnpTt:", 0, 0 },
.usage = "[-lnpT] " CMD_TARGET_WINDOW_USAGE,
- .flags = CMD_WINDOW_T,
+ .tflag = CMD_WINDOW,
+
+ .flags = 0,
.exec = cmd_select_window_exec
};
@@ -46,7 +48,9 @@ const struct cmd_entry cmd_next_window_entry = {
.args = { "at:", 0, 0 },
.usage = "[-a] " CMD_TARGET_SESSION_USAGE,
- .flags = CMD_SESSION_T,
+ .tflag = CMD_SESSION,
+
+ .flags = 0,
.exec = cmd_select_window_exec
};
@@ -57,7 +61,9 @@ const struct cmd_entry cmd_previous_window_entry = {
.args = { "at:", 0, 0 },
.usage = "[-a] " CMD_TARGET_SESSION_USAGE,
- .flags = CMD_SESSION_T,
+ .tflag = CMD_SESSION,
+
+ .flags = 0,
.exec = cmd_select_window_exec
};
@@ -68,7 +74,9 @@ const struct cmd_entry cmd_last_window_entry = {
.args = { "t:", 0, 0 },
.usage = CMD_TARGET_SESSION_USAGE,
- .flags = CMD_SESSION_T,
+ .tflag = CMD_SESSION,
+
+ .flags = 0,
.exec = cmd_select_window_exec
};