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-list-buffers.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd-list-buffers.c') diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c index 9d79072e..25f7e8bc 100644 --- a/cmd-list-buffers.c +++ b/cmd-list-buffers.c @@ -34,7 +34,6 @@ const struct cmd_entry cmd_list_buffers_entry = { "F:", 0, 0, "[-F format]", 0, - NULL, cmd_list_buffers_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-list-buffers.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd-list-buffers.c') diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c index 25f7e8bc..8eb1610f 100644 --- a/cmd-list-buffers.c +++ b/cmd-list-buffers.c @@ -27,6 +27,9 @@ * List paste buffers. */ +#define LIST_BUFFERS_TEMPLATE \ + "#{buffer_name}: #{buffer_size} bytes: \"#{buffer_sample}\"" + enum cmd_retval cmd_list_buffers_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_list_buffers_entry = { -- cgit