From 45dfc5a074e2ceae11a6d4aeae597bee1e028503 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Oct 2014 22:29:25 +0000 Subject: Instead of setting up the default keys by building the key struct directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon. --- cmd-choose-tree.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'cmd-choose-tree.c') diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c index 257908e1..eee49cc2 100644 --- a/cmd-choose-tree.c +++ b/cmd-choose-tree.c @@ -40,7 +40,6 @@ const struct cmd_entry cmd_choose_tree_entry = { "[-suw] [-b session-template] [-c window template] [-S format] " \ "[-W format] " CMD_TARGET_WINDOW_USAGE, 0, - NULL, cmd_choose_tree_exec }; @@ -49,7 +48,6 @@ const struct cmd_entry cmd_choose_session_entry = { "F:t:", 0, 1, CMD_TARGET_WINDOW_USAGE " [-F format] [template]", 0, - NULL, cmd_choose_tree_exec }; @@ -58,7 +56,6 @@ const struct cmd_entry cmd_choose_window_entry = { "F:t:", 0, 1, CMD_TARGET_WINDOW_USAGE "[-F format] [template]", 0, - NULL, cmd_choose_tree_exec }; -- cgit From 4c42381410891c43b1326e95f150dfcf637b1e69 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Oct 2014 23:35:28 +0000 Subject: Move template defines back into .c files. --- cmd-choose-tree.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmd-choose-tree.c') diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c index eee49cc2..823d0423 100644 --- a/cmd-choose-tree.c +++ b/cmd-choose-tree.c @@ -32,6 +32,15 @@ * Enter choice mode to choose a session and/or window. */ +#define CHOOSE_TREE_SESSION_TEMPLATE \ + "#{session_name}: #{session_windows} windows" \ + "#{?session_grouped, (group ,}" \ + "#{session_group}#{?session_grouped,),}" \ + "#{?session_attached, (attached),}" +#define CHOOSE_TREE_WINDOW_TEMPLATE \ + "#{window_index}: #{window_name}#{window_flags} " \ + "\"#{pane_title}\"" + enum cmd_retval cmd_choose_tree_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_choose_tree_entry = { -- cgit