From 2022217c9daeafa8716f908857f5b55629372f02 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 14 Dec 2015 00:31:55 +0000 Subject: Instead of combined flags for -c, -s, -t, split into different sets using an enum and simplify the parsing code. --- usr.bin/tmux/cmd-select-window.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'usr.bin/tmux/cmd-select-window.c') diff --git a/usr.bin/tmux/cmd-select-window.c b/usr.bin/tmux/cmd-select-window.c index 2a05be73ace..31e7fabf4dd 100644 --- a/usr.bin/tmux/cmd-select-window.c +++ b/usr.bin/tmux/cmd-select-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-select-window.c,v 1.14 2015/12/13 21:53:57 nicm Exp $ */ +/* $OpenBSD: cmd-select-window.c,v 1.15 2015/12/14 00:31:54 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 }; -- cgit v1.2.3