diff options
author | nicm <nicm> | 2015-12-13 21:53:57 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-12-13 21:53:57 +0000 |
commit | ecfeee2e8255a77f82a07124c93c8dbc7683c421 (patch) | |
tree | 9203458cd986398219f89c635b0583c8144b6cda | |
parent | 899bee0056b2d90b1c40c800473014b458ebd63d (diff) |
Use member names in cmd_entry definitions so I stop getting confused
about the order.
63 files changed, 716 insertions, 449 deletions
diff --git a/cmd-attach-session.c b/cmd-attach-session.c index c29e9d1a..976f180b 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -33,11 +33,14 @@ enum cmd_retval cmd_attach_session_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_attach_session_entry = { - "attach-session", "attach", - "c:dErt:", 0, 0, - "[-dEr] [-c working-directory] " CMD_TARGET_SESSION_USAGE, - CMD_STARTSERVER|CMD_SESSION_T|CMD_PANE_T|CMD_PREFERUNATTACHED, - cmd_attach_session_exec + .name = "attach-session", + .alias = "attach", + + .args = { "c:dErt:", 0, 0 }, + .usage = "[-dEr] [-c working-directory] " CMD_TARGET_SESSION_USAGE, + + .flags = CMD_STARTSERVER|CMD_SESSION_T|CMD_PANE_T|CMD_PREFERUNATTACHED, + .exec = cmd_attach_session_exec }; enum cmd_retval diff --git a/cmd-bind-key.c b/cmd-bind-key.c index b13409cb..df3285f7 100644 --- a/cmd-bind-key.c +++ b/cmd-bind-key.c @@ -33,11 +33,15 @@ enum cmd_retval cmd_bind_key_mode_table(struct cmd *, struct cmd_q *, key_code); const struct cmd_entry cmd_bind_key_entry = { - "bind-key", "bind", - "cnrt:T:", 1, -1, - "[-cnr] [-t mode-table] [-T key-table] key command [arguments]", - 0, - cmd_bind_key_exec + .name = "bind-key", + .alias = "bind", + + .args = { "cnrt:T:", 1, -1 }, + .usage = "[-cnr] [-t mode-table] [-T key-table] key command " + "[arguments]", + + .flags = 0, + .exec = cmd_bind_key_exec }; enum cmd_retval diff --git a/cmd-break-pane.c b/cmd-break-pane.c index eb07fb87..62625c71 100644 --- a/cmd-break-pane.c +++ b/cmd-break-pane.c @@ -31,11 +31,14 @@ enum cmd_retval cmd_break_pane_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_break_pane_entry = { - "break-pane", "breakp", - "dPF:s:t:", 0, 0, - "[-dP] [-F format] " CMD_SRCDST_PANE_USAGE, - CMD_PANE_S|CMD_INDEX_T, - cmd_break_pane_exec + .name = "break-pane", + .alias = "breakp", + + .args = { "dPF:s:t:", 0, 0 }, + .usage = "[-dP] [-F format] " CMD_SRCDST_PANE_USAGE, + + .flags = CMD_PANE_S|CMD_INDEX_T, + .exec = cmd_break_pane_exec }; enum cmd_retval diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index 9d22a0f2..0e3644e9 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -36,12 +36,15 @@ char *cmd_capture_pane_history(struct args *, struct cmd_q *, struct window_pane *, size_t *); const struct cmd_entry cmd_capture_pane_entry = { - "capture-pane", "capturep", - "ab:CeE:JpPqS:t:", 0, 0, - "[-aCeJpPq] " CMD_BUFFER_USAGE " [-E end-line] [-S start-line]" - CMD_TARGET_PANE_USAGE, - CMD_PANE_T, - cmd_capture_pane_exec + .name = "capture-pane", + .alias = "capturep", + + .args = { "ab:CeE:JpPqS:t:", 0, 0 }, + .usage = "[-aCeJpPq] " CMD_BUFFER_USAGE " [-E end-line] " + "[-S start-line]" CMD_TARGET_PANE_USAGE, + + .flags = CMD_PANE_T, + .exec = cmd_capture_pane_exec }; char * diff --git a/cmd-choose-buffer.c b/cmd-choose-buffer.c index 4418d415..fac792e9 100644 --- a/cmd-choose-buffer.c +++ b/cmd-choose-buffer.c @@ -33,11 +33,14 @@ enum cmd_retval cmd_choose_buffer_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_choose_buffer_entry = { - "choose-buffer", NULL, - "F:t:", 0, 1, - CMD_TARGET_WINDOW_USAGE " [-F format] [template]", - CMD_WINDOW_T, - cmd_choose_buffer_exec + .name = "choose-buffer", + .alias = NULL, + + .args = { "F:t:", 0, 1 }, + .usage = CMD_TARGET_WINDOW_USAGE " [-F format] [template]", + + .flags = CMD_WINDOW_T, + .exec = cmd_choose_buffer_exec }; enum cmd_retval diff --git a/cmd-choose-client.c b/cmd-choose-client.c index c58bc826..ab0f6c50 100644 --- a/cmd-choose-client.c +++ b/cmd-choose-client.c @@ -38,11 +38,14 @@ enum cmd_retval cmd_choose_client_exec(struct cmd *, struct cmd_q *); void cmd_choose_client_callback(struct window_choose_data *); const struct cmd_entry cmd_choose_client_entry = { - "choose-client", NULL, - "F:t:", 0, 1, - CMD_TARGET_WINDOW_USAGE " [-F format] [template]", - CMD_WINDOW_T, - cmd_choose_client_exec + .name = "choose-client", + .alias = NULL, + + .args = { "F:t:", 0, 1 }, + .usage = CMD_TARGET_WINDOW_USAGE " [-F format] [template]", + + .flags = CMD_WINDOW_T, + .exec = cmd_choose_client_exec }; struct cmd_choose_client_data { diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c index 766978fe..faa9150c 100644 --- a/cmd-choose-tree.c +++ b/cmd-choose-tree.c @@ -44,28 +44,38 @@ enum cmd_retval cmd_choose_tree_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_choose_tree_entry = { - "choose-tree", NULL, - "S:W:swub:c:t:", 0, 1, - "[-suw] [-b session-template] [-c window template] [-S format] " \ - "[-W format] " CMD_TARGET_WINDOW_USAGE, - CMD_WINDOW_T, - cmd_choose_tree_exec + .name = "choose-tree", + .alias = NULL, + + .args = { "S:W:swub:c:t:", 0, 1 }, + .usage = "[-suw] [-b session-template] [-c window template] " + "[-S format] [-W format] " CMD_TARGET_WINDOW_USAGE, + + .flags = CMD_WINDOW_T, + .exec = cmd_choose_tree_exec }; const struct cmd_entry cmd_choose_session_entry = { - "choose-session", NULL, - "F:t:", 0, 1, - CMD_TARGET_WINDOW_USAGE " [-F format] [template]", - CMD_WINDOW_T, - cmd_choose_tree_exec + .name = "choose-session", + .alias = NULL, + + .args = { "F:t:", 0, 1 }, + + .usage = CMD_TARGET_WINDOW_USAGE " [-F format] [template]", + .flags = CMD_WINDOW_T, + + .exec = cmd_choose_tree_exec }; const struct cmd_entry cmd_choose_window_entry = { - "choose-window", NULL, - "F:t:", 0, 1, - CMD_TARGET_WINDOW_USAGE "[-F format] [template]", - CMD_WINDOW_T, - cmd_choose_tree_exec + .name = "choose-window", + .alias = NULL, + + .args = { "F:t:", 0, 1 }, + .usage = CMD_TARGET_WINDOW_USAGE "[-F format] [template]", + + .flags = CMD_WINDOW_T, + .exec = cmd_choose_tree_exec }; enum cmd_retval diff --git a/cmd-clear-history.c b/cmd-clear-history.c index a76cab80..a8c2bfdc 100644 --- a/cmd-clear-history.c +++ b/cmd-clear-history.c @@ -27,11 +27,14 @@ enum cmd_retval cmd_clear_history_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_clear_history_entry = { - "clear-history", "clearhist", - "t:", 0, 0, - CMD_TARGET_PANE_USAGE, - CMD_PANE_T, - cmd_clear_history_exec + .name = "clear-history", + .alias = "clearhist", + + .args = { "t:", 0, 0 }, + .usage = CMD_TARGET_PANE_USAGE, + + .flags = CMD_PANE_T, + .exec = cmd_clear_history_exec }; enum cmd_retval diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index 900fceb9..64b24bb5 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -35,11 +35,15 @@ int cmd_command_prompt_callback(void *, const char *); void cmd_command_prompt_free(void *); const struct cmd_entry cmd_command_prompt_entry = { - "command-prompt", NULL, - "I:p:t:", 0, 1, - "[-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " [template]", - CMD_CLIENT_T, - cmd_command_prompt_exec + .name = "command-prompt", + .alias = NULL, + + .args = { "I:p:t:", 0, 1 }, + .usage = "[-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " + "[template]", + + .flags = CMD_CLIENT_T, + .exec = cmd_command_prompt_exec }; struct cmd_command_prompt_cdata { diff --git a/cmd-confirm-before.c b/cmd-confirm-before.c index 17a575a2..90e16992 100644 --- a/cmd-confirm-before.c +++ b/cmd-confirm-before.c @@ -34,11 +34,14 @@ int cmd_confirm_before_callback(void *, const char *); void cmd_confirm_before_free(void *); const struct cmd_entry cmd_confirm_before_entry = { - "confirm-before", "confirm", - "p:t:", 1, 1, - "[-p prompt] " CMD_TARGET_CLIENT_USAGE " command", - CMD_CLIENT_T, - cmd_confirm_before_exec + .name = "confirm-before", + .alias = "confirm", + + .args = { "p:t:", 1, 1 }, + .usage = "[-p prompt] " CMD_TARGET_CLIENT_USAGE " command", + + .flags = CMD_CLIENT_T, + .exec = cmd_confirm_before_exec }; struct cmd_confirm_before_data { diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c index 79d06cee..7c6f6ca7 100644 --- a/cmd-copy-mode.c +++ b/cmd-copy-mode.c @@ -27,19 +27,25 @@ enum cmd_retval cmd_copy_mode_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_copy_mode_entry = { - "copy-mode", NULL, - "Met:u", 0, 0, - "[-Mu] " CMD_TARGET_PANE_USAGE, - CMD_PANE_T, - cmd_copy_mode_exec + .name = "copy-mode", + .alias = NULL, + + .args = { "Met:u", 0, 0 }, + .usage = "[-Mu] " CMD_TARGET_PANE_USAGE, + + .flags = CMD_PANE_T, + .exec = cmd_copy_mode_exec }; const struct cmd_entry cmd_clock_mode_entry = { - "clock-mode", NULL, - "t:", 0, 0, - CMD_TARGET_PANE_USAGE, - 0, - cmd_copy_mode_exec + .name = "clock-mode", + .alias = NULL, + + .args = { "t:", 0, 0 }, + .usage = CMD_TARGET_PANE_USAGE, + + .flags = 0, + .exec = cmd_copy_mode_exec }; enum cmd_retval diff --git a/cmd-detach-client.c b/cmd-detach-client.c index 86f8063c..6f6adbb9 100644 --- a/cmd-detach-client.c +++ b/cmd-detach-client.c @@ -29,19 +29,25 @@ enum cmd_retval cmd_detach_client_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_detach_client_entry = { - "detach-client", "detach", - "as:t:P", 0, 0, - "[-P] [-a] [-s target-session] " CMD_TARGET_CLIENT_USAGE, - CMD_READONLY|CMD_CLIENT_T|CMD_SESSION_S, - cmd_detach_client_exec + .name = "detach-client", + .alias = "detach", + + .args = { "as:t:P", 0, 0 }, + .usage = "[-P] [-a] [-s target-session] " CMD_TARGET_CLIENT_USAGE, + + .flags = CMD_READONLY|CMD_CLIENT_T|CMD_SESSION_S, + .exec = cmd_detach_client_exec }; const struct cmd_entry cmd_suspend_client_entry = { - "suspend-client", "suspendc", - "t:", 0, 0, - CMD_TARGET_CLIENT_USAGE, - CMD_CLIENT_T, - cmd_detach_client_exec + .name = "suspend-client", + .alias = "suspendc", + + .args = { "t:", 0, 0 }, + .usage = CMD_TARGET_CLIENT_USAGE, + + .flags = CMD_CLIENT_T, + .exec = cmd_detach_client_exec }; enum cmd_retval diff --git a/cmd-display-message.c b/cmd-display-message.c index ddc55846..fdfa6ae2 100644 --- a/cmd-display-message.c +++ b/cmd-display-message.c @@ -35,12 +35,15 @@ enum cmd_retval cmd_display_message_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_display_message_entry = { - "display-message", "display", - "c:pt:F:", 0, 1, - "[-p] [-c target-client] [-F format] " CMD_TARGET_PANE_USAGE - " [message]", - CMD_CLIENT_C|CMD_PANE_T|CMD_CLIENT_CANFAIL, - cmd_display_message_exec + .name = "display-message", + .alias = "display", + + .args = { "c:pt:F:", 0, 1 }, + .usage = "[-p] [-c target-client] [-F format] " + CMD_TARGET_PANE_USAGE " [message]", + + .flags = CMD_CLIENT_C|CMD_PANE_T|CMD_CLIENT_CANFAIL, + .exec = cmd_display_message_exec }; enum cmd_retval diff --git a/cmd-display-panes.c b/cmd-display-panes.c index 714ee19e..db1e4b08 100644 --- a/cmd-display-panes.c +++ b/cmd-display-panes.c @@ -27,11 +27,14 @@ enum cmd_retval cmd_display_panes_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_display_panes_entry = { - "display-panes", "displayp", - "t:", 0, 0, - CMD_TARGET_CLIENT_USAGE, - CMD_CLIENT_T, - cmd_display_panes_exec + .name = "display-panes", + .alias = "displayp", + + .args = { "t:", 0, 0 }, + .usage = CMD_TARGET_CLIENT_USAGE, + + .flags = CMD_CLIENT_T, + .exec = cmd_display_panes_exec }; enum cmd_retval diff --git a/cmd-find-window.c b/cmd-find-window.c index 1733b717..9c31cc0e 100644 --- a/cmd-find-window.c +++ b/cmd-find-window.c @@ -48,11 +48,14 @@ void cmd_find_window_callback(struct window_choose_data *); CMD_FIND_WINDOW_BY_NAME) const struct cmd_entry cmd_find_window_entry = { - "find-window", "findw", - "F:CNt:T", 1, 4, - "[-CNT] [-F format] " CMD_TARGET_WINDOW_USAGE " match-string", - CMD_WINDOW_T, - cmd_find_window_exec + .name = "find-window", + .alias = "findw", + + .args = { "F:CNt:T", 1, 4 }, + .usage = "[-CNT] [-F format] " CMD_TARGET_WINDOW_USAGE " match-string", + + .flags = CMD_WINDOW_T, + .exec = cmd_find_window_exec }; struct cmd_find_window_data { diff --git a/cmd-if-shell.c b/cmd-if-shell.c index 404f4671..4c2cacb1 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -36,11 +36,15 @@ void cmd_if_shell_done(struct cmd_q *); void cmd_if_shell_free(void *); const struct cmd_entry cmd_if_shell_entry = { - "if-shell", "if", - "bFt:", 2, 3, - "[-bF] " CMD_TARGET_PANE_USAGE " shell-command command [command]", - CMD_PANE_T|CMD_CANFAIL, - cmd_if_shell_exec + .name = "if-shell", + .alias = "if", + + .args = { "bFt:", 2, 3 }, + .usage = "[-bF] " CMD_TARGET_PANE_USAGE " shell-command command " + "[command]", + + .flags = CMD_PANE_T|CMD_CANFAIL, + .exec = cmd_if_shell_exec }; struct cmd_if_shell_data { diff --git a/cmd-join-pane.c b/cmd-join-pane.c index 6fc5b977..e5fbb423 100644 --- a/cmd-join-pane.c +++ b/cmd-join-pane.c @@ -34,19 +34,25 @@ enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmd_q *); enum cmd_retval join_pane(struct cmd *, struct cmd_q *, int); const struct cmd_entry cmd_join_pane_entry = { - "join-pane", "joinp", - "bdhvp:l:s:t:", 0, 0, - "[-bdhv] [-p percentage|-l size] " CMD_SRCDST_PANE_USAGE, - CMD_PANE_MARKED_S|CMD_PANE_T, - cmd_join_pane_exec + .name = "join-pane", + .alias = "joinp", + + .args = { "bdhvp:l:s:t:", 0, 0 }, + .usage = "[-bdhv] [-p percentage|-l size] " CMD_SRCDST_PANE_USAGE, + + .flags = CMD_PANE_MARKED_S|CMD_PANE_T, + .exec = cmd_join_pane_exec }; const struct cmd_entry cmd_move_pane_entry = { - "move-pane", "movep", - "bdhvp:l:s:t:", 0, 0, - "[-bdhv] [-p percentage|-l size] " CMD_SRCDST_PANE_USAGE, - CMD_PANE_S|CMD_PANE_T, - cmd_join_pane_exec + .name = "move-pane", + .alias = "movep", + + .args = { "bdhvp:l:s:t:", 0, 0 }, + .usage = "[-bdhv] [-p percentage|-l size] " CMD_SRCDST_PANE_USAGE, + + .flags = CMD_PANE_S|CMD_PANE_T, + .exec = cmd_join_pane_exec }; enum cmd_retval diff --git a/cmd-kill-pane.c b/cmd-kill-pane.c index d5f69ea9..3e558d7d 100644 --- a/cmd-kill-pane.c +++ b/cmd-kill-pane.c @@ -29,11 +29,14 @@ enum cmd_retval cmd_kill_pane_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_kill_pane_entry = { - "kill-pane", "killp", - "at:", 0, 0, - "[-a] " CMD_TARGET_PANE_USAGE, - CMD_PANE_T, - cmd_kill_pane_exec + .name = "kill-pane", + .alias = "killp", + + .args = { "at:", 0, 0 }, + .usage = "[-a] " CMD_TARGET_PANE_USAGE, + + .flags = CMD_PANE_T, + .exec = cmd_kill_pane_exec }; enum cmd_retval diff --git a/cmd-kill-server.c b/cmd-kill-server.c index 4107e6b6..6f84e959 100644 --- a/cmd-kill-server.c +++ b/cmd-kill-server.c @@ -30,19 +30,25 @@ enum cmd_retval cmd_kill_server_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_kill_server_entry = { - "kill-server", NULL, - "", 0, 0, - "", - 0, - cmd_kill_server_exec + .name = "kill-server", + .alias = NULL, + + .args = { "", 0, 0 }, + .usage = "", + + .flags = 0, + .exec = cmd_kill_server_exec }; const struct cmd_entry cmd_start_server_entry = { - "start-server", "start", - "", 0, 0, - "", - CMD_STARTSERVER, - cmd_kill_server_exec + .name = "start-server", + .alias = "start", + + .args = { "", 0, 0 }, + .usage = "", + + .flags = CMD_STARTSERVER, + .exec = cmd_kill_server_exec }; enum cmd_retval diff --git a/cmd-kill-session.c b/cmd-kill-session.c index a4b0d5d2..a8d2d996 100644 --- a/cmd-kill-session.c +++ b/cmd-kill-session.c @@ -30,11 +30,14 @@ enum cmd_retval cmd_kill_session_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_kill_session_entry = { - "kill-session", NULL, - "aCt:", 0, 0, - "[-aC] " CMD_TARGET_SESSION_USAGE, - CMD_SESSION_T, - cmd_kill_session_exec + .name = "kill-session", + .alias = NULL, + + .args = { "aCt:", 0, 0 }, + .usage = "[-aC] " CMD_TARGET_SESSION_USAGE, + + .flags = CMD_SESSION_T, + .exec = cmd_kill_session_exec }; enum cmd_retval diff --git a/cmd-kill-window.c b/cmd-kill-window.c index 4ab17472..b8e1d5bc 100644 --- a/cmd-kill-window.c +++ b/cmd-kill-window.c @@ -27,19 +27,25 @@ enum cmd_retval cmd_kill_window_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_kill_window_entry = { - "kill-window", "killw", - "at:", 0, 0, - "[-a] " CMD_TARGET_WINDOW_USAGE, - CMD_WINDOW_T, - cmd_kill_window_exec + .name = "kill-window", + .alias = "killw", + + .args = { "at:", 0, 0 }, + .usage = "[-a] " CMD_TARGET_WINDOW_USAGE, + + .flags = CMD_WINDOW_T, + .exec = cmd_kill_window_exec }; const struct cmd_entry cmd_unlink_window_entry = { - "unlink-window", "unlinkw", - "kt:", 0, 0, - "[-k] " CMD_TARGET_WINDOW_USAGE, - CMD_WINDOW_T, - cmd_kill_window_exec + .name = "unlink-window", + .alias = "unlinkw", + + .args = { "kt:", 0, 0 }, + .usage = "[-k] " CMD_TARGET_WINDOW_USAGE, + + .flags = CMD_WINDOW_T, + .exec = cmd_kill_window_exec }; enum cmd_retval diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c index 218eb6ff..a6007c33 100644 --- a/cmd-list-buffers.c +++ b/cmd-list-buffers.c @@ -33,11 +33,14 @@ enum cmd_retval cmd_list_buffers_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_list_buffers_entry = { - "list-buffers", "lsb", - "F:", 0, 0, - "[-F format]", - 0, - cmd_list_buffers_exec + .name = "list-buffers", + .alias = "lsb", + + .args = { "F:", 0, 0 }, + .usage = "[-F format]", + + .flags = 0, + .exec = cmd_list_buffers_exec }; enum cmd_retval |