Skip to content

Commit

Permalink
Add args parsing callback for some future work, currently unused.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Aug 21, 2021
1 parent d371764 commit 08e6360
Show file tree
Hide file tree
Showing 61 changed files with 91 additions and 89 deletions.
2 changes: 1 addition & 1 deletion cmd-attach-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const struct cmd_entry cmd_attach_session_entry = {
.name = "attach-session",
.alias = "attach",

.args = { "c:dEf:rt:x", 0, 0 },
.args = { "c:dEf:rt:x", 0, 0, NULL },
.usage = "[-dErx] [-c working-directory] [-f flags] "
CMD_TARGET_SESSION_USAGE,

Expand Down
2 changes: 1 addition & 1 deletion cmd-bind-key.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const struct cmd_entry cmd_bind_key_entry = {
.name = "bind-key",
.alias = "bind",

.args = { "nrN:T:", 1, -1 },
.args = { "nrN:T:", 1, -1, NULL },
.usage = "[-nr] [-T key-table] [-N note] key "
"[command [arguments]]",

Expand Down
2 changes: 1 addition & 1 deletion cmd-break-pane.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const struct cmd_entry cmd_break_pane_entry = {
.name = "break-pane",
.alias = "breakp",

.args = { "abdPF:n:s:t:", 0, 0 },
.args = { "abdPF:n:s:t:", 0, 0, NULL },
.usage = "[-abdP] [-F format] [-n window-name] [-s src-pane] "
"[-t dst-window]",

Expand Down
4 changes: 2 additions & 2 deletions cmd-capture-pane.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const struct cmd_entry cmd_capture_pane_entry = {
.name = "capture-pane",
.alias = "capturep",

.args = { "ab:CeE:JNpPqS:t:", 0, 0 },
.args = { "ab:CeE:JNpPqS:t:", 0, 0, NULL },
.usage = "[-aCeJNpPq] " CMD_BUFFER_USAGE " [-E end-line] "
"[-S start-line] " CMD_TARGET_PANE_USAGE,

Expand All @@ -53,7 +53,7 @@ const struct cmd_entry cmd_clear_history_entry = {
.name = "clear-history",
.alias = "clearhist",

.args = { "t:", 0, 0 },
.args = { "t:", 0, 0, NULL },
.usage = CMD_TARGET_PANE_USAGE,

.target = { 't', CMD_FIND_PANE, 0 },
Expand Down
8 changes: 4 additions & 4 deletions cmd-choose-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const struct cmd_entry cmd_choose_tree_entry = {
.name = "choose-tree",
.alias = NULL,

.args = { "F:f:GK:NO:rst:wZ", 0, 1 },
.args = { "F:f:GK:NO:rst:wZ", 0, 1, NULL },
.usage = "[-GNrswZ] [-F format] [-f filter] [-K key-format] "
"[-O sort-order] " CMD_TARGET_PANE_USAGE " [template]",

Expand All @@ -44,7 +44,7 @@ const struct cmd_entry cmd_choose_client_entry = {
.name = "choose-client",
.alias = NULL,

.args = { "F:f:K:NO:rt:Z", 0, 1 },
.args = { "F:f:K:NO:rt:Z", 0, 1, NULL },
.usage = "[-NrZ] [-F format] [-f filter] [-K key-format] "
"[-O sort-order] " CMD_TARGET_PANE_USAGE " [template]",

Expand All @@ -58,7 +58,7 @@ const struct cmd_entry cmd_choose_buffer_entry = {
.name = "choose-buffer",
.alias = NULL,

.args = { "F:f:K:NO:rt:Z", 0, 1 },
.args = { "F:f:K:NO:rt:Z", 0, 1, NULL },
.usage = "[-NrZ] [-F format] [-f filter] [-K key-format] "
"[-O sort-order] " CMD_TARGET_PANE_USAGE " [template]",

Expand All @@ -72,7 +72,7 @@ const struct cmd_entry cmd_customize_mode_entry = {
.name = "customize-mode",
.alias = NULL,

.args = { "F:f:Nt:Z", 0, 0 },
.args = { "F:f:Nt:Z", 0, 0, NULL },
.usage = "[-NZ] [-F format] [-f filter] " CMD_TARGET_PANE_USAGE,

.target = { 't', CMD_FIND_PANE, 0 },
Expand Down
2 changes: 1 addition & 1 deletion cmd-command-prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const struct cmd_entry cmd_command_prompt_entry = {
.name = "command-prompt",
.alias = NULL,

.args = { "1bFkiI:Np:t:T:", 0, 1 },
.args = { "1bFkiI:Np:t:T:", 0, 1, NULL },
.usage = "[-1bFkiN] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE
" [-T type] [template]",

Expand Down
2 changes: 1 addition & 1 deletion cmd-confirm-before.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const struct cmd_entry cmd_confirm_before_entry = {
.name = "confirm-before",
.alias = "confirm",

.args = { "bp:t:", 1, 1 },
.args = { "bp:t:", 1, 1, NULL },
.usage = "[-b] [-p prompt] " CMD_TARGET_CLIENT_USAGE " command",

.flags = CMD_CLIENT_TFLAG,
Expand Down
4 changes: 2 additions & 2 deletions cmd-copy-mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const struct cmd_entry cmd_copy_mode_entry = {
.name = "copy-mode",
.alias = NULL,

.args = { "eHMs:t:uq", 0, 0 },
.args = { "eHMs:t:uq", 0, 0, NULL },
.usage = "[-eHMuq] [-s src-pane] " CMD_TARGET_PANE_USAGE,

.source = { 's', CMD_FIND_PANE, 0 },
Expand All @@ -44,7 +44,7 @@ const struct cmd_entry cmd_clock_mode_entry = {
.name = "clock-mode",
.alias = NULL,

.args = { "t:", 0, 0 },
.args = { "t:", 0, 0, NULL },
.usage = CMD_TARGET_PANE_USAGE,

.target = { 't', CMD_FIND_PANE, 0 },
Expand Down
4 changes: 2 additions & 2 deletions cmd-detach-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const struct cmd_entry cmd_detach_client_entry = {
.name = "detach-client",
.alias = "detach",

.args = { "aE:s:t:P", 0, 0 },
.args = { "aE:s:t:P", 0, 0, NULL },
.usage = "[-aP] [-E shell-command] "
"[-s target-session] " CMD_TARGET_CLIENT_USAGE,

Expand All @@ -47,7 +47,7 @@ const struct cmd_entry cmd_suspend_client_entry = {
.name = "suspend-client",
.alias = "suspendc",

.args = { "t:", 0, 0 },
.args = { "t:", 0, 0, NULL },
.usage = CMD_TARGET_CLIENT_USAGE,

.flags = CMD_CLIENT_TFLAG,
Expand Down
4 changes: 2 additions & 2 deletions cmd-display-menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const struct cmd_entry cmd_display_menu_entry = {
.name = "display-menu",
.alias = "menu",

.args = { "c:t:OT:x:y:", 1, -1 },
.args = { "c:t:OT:x:y:", 1, -1, NULL },
.usage = "[-O] [-c target-client] " CMD_TARGET_PANE_USAGE " [-T title] "
"[-x position] [-y position] name key command ...",

Expand All @@ -51,7 +51,7 @@ const struct cmd_entry cmd_display_popup_entry = {
.name = "display-popup",
.alias = "popup",

.args = { "BCc:d:Eh:t:w:x:y:", 0, -1 },
.args = { "BCc:d:Eh:t:w:x:y:", 0, -1, NULL },
.usage = "[-BCE] [-c target-client] [-d start-directory] [-h height] "
CMD_TARGET_PANE_USAGE " [-w width] "
"[-x position] [-y position] [command]",
Expand Down
2 changes: 1 addition & 1 deletion cmd-display-message.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const struct cmd_entry cmd_display_message_entry = {
.name = "display-message",
.alias = "display",

.args = { "ac:d:INpt:F:v", 0, 1 },
.args = { "ac:d:INpt:F:v", 0, 1, NULL },
.usage = "[-aINpv] [-c target-client] [-d delay] [-F format] "
CMD_TARGET_PANE_USAGE " [message]",

Expand Down
2 changes: 1 addition & 1 deletion cmd-display-panes.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const struct cmd_entry cmd_display_panes_entry = {
.name = "display-panes",
.alias = "displayp",

.args = { "bd:Nt:", 0, 1 },
.args = { "bd:Nt:", 0, 1, NULL },
.usage = "[-bN] [-d duration] " CMD_TARGET_CLIENT_USAGE " [template]",

.flags = CMD_AFTERHOOK|CMD_CLIENT_TFLAG,
Expand Down
2 changes: 1 addition & 1 deletion cmd-find-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const struct cmd_entry cmd_find_window_entry = {
.name = "find-window",
.alias = "findw",

.args = { "CiNrt:TZ", 1, 1 },
.args = { "CiNrt:TZ", 1, 1, NULL },
.usage = "[-CiNrTZ] " CMD_TARGET_PANE_USAGE " match-string",

.target = { 't', CMD_FIND_PANE, 0 },
Expand Down
2 changes: 1 addition & 1 deletion cmd-if-shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const struct cmd_entry cmd_if_shell_entry = {
.name = "if-shell",
.alias = "if",

.args = { "bFt:", 2, 3 },
.args = { "bFt:", 2, 3, NULL },
.usage = "[-bF] " CMD_TARGET_PANE_USAGE " shell-command command "
"[command]",

Expand Down
4 changes: 2 additions & 2 deletions cmd-join-pane.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const struct cmd_entry cmd_join_pane_entry = {
.name = "join-pane",
.alias = "joinp",

.args = { "bdfhvp:l:s:t:", 0, 0 },
.args = { "bdfhvp:l:s:t:", 0, 0, NULL },
.usage = "[-bdfhv] [-l size] " CMD_SRCDST_PANE_USAGE,

.source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED },
Expand All @@ -50,7 +50,7 @@ const struct cmd_entry cmd_move_pane_entry = {
.name = "move-pane",
.alias = "movep",

.args = { "bdfhvp:l:s:t:", 0, 0 },
.args = { "bdfhvp:l:s:t:", 0, 0, NULL },
.usage = "[-bdfhv] [-l size] " CMD_SRCDST_PANE_USAGE,

.source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED },
Expand Down
2 changes: 1 addition & 1 deletion cmd-kill-pane.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const struct cmd_entry cmd_kill_pane_entry = {
.name = "kill-pane",
.alias = "killp",

.args = { "at:", 0, 0 },
.args = { "at:", 0, 0, NULL },
.usage = "[-a] " CMD_TARGET_PANE_USAGE,

.target = { 't', CMD_FIND_PANE, 0 },
Expand Down
4 changes: 2 additions & 2 deletions cmd-kill-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const struct cmd_entry cmd_kill_server_entry = {
.name = "kill-server",
.alias = NULL,

.args = { "", 0, 0 },
.args = { "", 0, 0, NULL },
.usage = "",

.flags = 0,
Expand All @@ -44,7 +44,7 @@ const struct cmd_entry cmd_start_server_entry = {
.name = "start-server",
.alias = "start",

.args = { "", 0, 0 },
.args = { "", 0, 0, NULL },
.usage = "",

.flags = CMD_STARTSERVER,
Expand Down
2 changes: 1 addition & 1 deletion cmd-kill-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const struct cmd_entry cmd_kill_session_entry = {
.name = "kill-session",
.alias = NULL,

.args = { "aCt:", 0, 0 },
.args = { "aCt:", 0, 0, NULL },
.usage = "[-aC] " CMD_TARGET_SESSION_USAGE,

.target = { 't', CMD_FIND_SESSION, 0 },
Expand Down
4 changes: 2 additions & 2 deletions cmd-kill-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const struct cmd_entry cmd_kill_window_entry = {
.name = "kill-window",
.alias = "killw",

.args = { "at:", 0, 0 },
.args = { "at:", 0, 0, NULL },
.usage = "[-a] " CMD_TARGET_WINDOW_USAGE,

.target = { 't', CMD_FIND_WINDOW, 0 },
Expand All @@ -43,7 +43,7 @@ const struct cmd_entry cmd_unlink_window_entry = {
.name = "unlink-window",
.alias = "unlinkw",

.args = { "kt:", 0, 0 },
.args = { "kt:", 0, 0, NULL },
.usage = "[-k] " CMD_TARGET_WINDOW_USAGE,

.target = { 't', CMD_FIND_WINDOW, 0 },
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-buffers.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const struct cmd_entry cmd_list_buffers_entry = {
.name = "list-buffers",
.alias = "lsb",

.args = { "F:f:", 0, 0 },
.args = { "F:f:", 0, 0, NULL },
.usage = "[-F format] [-f filter]",

.flags = CMD_AFTERHOOK,
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-clients.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const struct cmd_entry cmd_list_clients_entry = {
.name = "list-clients",
.alias = "lsc",

.args = { "F:t:", 0, 0 },
.args = { "F:t:", 0, 0, NULL },
.usage = "[-F format] " CMD_TARGET_SESSION_USAGE,

.target = { 't', CMD_FIND_SESSION, 0 },
Expand Down
4 changes: 2 additions & 2 deletions cmd-list-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const struct cmd_entry cmd_list_keys_entry = {
.name = "list-keys",
.alias = "lsk",

.args = { "1aNP:T:", 0, 1 },
.args = { "1aNP:T:", 0, 1, NULL },
.usage = "[-1aN] [-P prefix-string] [-T key-table] [key]",

.flags = CMD_STARTSERVER|CMD_AFTERHOOK,
Expand All @@ -47,7 +47,7 @@ const struct cmd_entry cmd_list_commands_entry = {
.name = "list-commands",
.alias = "lscm",

.args = { "F:", 0, 1 },
.args = { "F:", 0, 1, NULL },
.usage = "[-F format] [command]",

.flags = CMD_STARTSERVER|CMD_AFTERHOOK,
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-panes.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const struct cmd_entry cmd_list_panes_entry = {
.name = "list-panes",
.alias = "lsp",

.args = { "asF:f:t:", 0, 0 },
.args = { "asF:f:t:", 0, 0, NULL },
.usage = "[-as] [-F format] [-f filter] " CMD_TARGET_WINDOW_USAGE,

.target = { 't', CMD_FIND_WINDOW, 0 },
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-sessions.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const struct cmd_entry cmd_list_sessions_entry = {
.name = "list-sessions",
.alias = "ls",

.args = { "F:f:", 0, 0 },
.args = { "F:f:", 0, 0, NULL },
.usage = "[-F format] [-f filter]",

.flags = CMD_AFTERHOOK,
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const struct cmd_entry cmd_list_windows_entry = {
.name = "list-windows",
.alias = "lsw",

.args = { "F:f:at:", 0, 0 },
.args = { "F:f:at:", 0, 0, NULL },
.usage = "[-a] [-F format] [-f filter] " CMD_TARGET_SESSION_USAGE,

.target = { 't', CMD_FIND_SESSION, 0 },
Expand Down
2 changes: 1 addition & 1 deletion cmd-load-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const struct cmd_entry cmd_load_buffer_entry = {
.name = "load-buffer",
.alias = "loadb",

.args = { "b:t:w", 1, 1 },
.args = { "b:t:w", 1, 1, NULL },
.usage = CMD_BUFFER_USAGE " " CMD_TARGET_CLIENT_USAGE " path",

.flags = CMD_AFTERHOOK|CMD_CLIENT_TFLAG|CMD_CLIENT_CANFAIL,
Expand Down
6 changes: 3 additions & 3 deletions cmd-lock-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const struct cmd_entry cmd_lock_server_entry = {
.name = "lock-server",
.alias = "lock",

.args = { "", 0, 0 },
.args = { "", 0, 0, NULL },
.usage = "",

.flags = CMD_AFTERHOOK,
Expand All @@ -41,7 +41,7 @@ const struct cmd_entry cmd_lock_session_entry = {
.name = "lock-session",
.alias = "locks",

.args = { "t:", 0, 0 },
.args = { "t:", 0, 0, NULL },
.usage = CMD_TARGET_SESSION_USAGE,

.target = { 't', CMD_FIND_SESSION, 0 },
Expand All @@ -54,7 +54,7 @@ const struct cmd_entry cmd_lock_client_entry = {
.name = "lock-client",
.alias = "lockc",

.args = { "t:", 0, 0 },
.args = { "t:", 0, 0, NULL },
.usage = CMD_TARGET_CLIENT_USAGE,

.flags = CMD_AFTERHOOK|CMD_CLIENT_TFLAG,
Expand Down
4 changes: 2 additions & 2 deletions cmd-move-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const struct cmd_entry cmd_move_window_entry = {
.name = "move-window",
.alias = "movew",

.args = { "abdkrs:t:", 0, 0 },
.args = { "abdkrs:t:", 0, 0, NULL },
.usage = "[-abdkr] " CMD_SRCDST_WINDOW_USAGE,

.source = { 's', CMD_FIND_WINDOW, 0 },
Expand All @@ -46,7 +46,7 @@ const struct cmd_entry cmd_link_window_entry = {
.name = "link-window",
.alias = "linkw",

.args = { "abdks:t:", 0, 0 },
.args = { "abdks:t:", 0, 0, NULL },
.usage = "[-abdk] " CMD_SRCDST_WINDOW_USAGE,

.source = { 's', CMD_FIND_WINDOW, 0 },
Expand Down
4 changes: 2 additions & 2 deletions cmd-new-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const struct cmd_entry cmd_new_session_entry = {
.name = "new-session",
.alias = "new",

.args = { "Ac:dDe:EF:f:n:Ps:t:x:Xy:", 0, -1 },
.args = { "Ac:dDe:EF:f:n:Ps:t:x:Xy:", 0, -1, NULL },
.usage = "[-AdDEPX] [-c start-directory] [-e environment] [-F format] "
"[-f flags] [-n window-name] [-s session-name] "
CMD_TARGET_SESSION_USAGE " [-x width] [-y height] [command]",
Expand All @@ -54,7 +54,7 @@ const struct cmd_entry cmd_has_session_entry = {
.name = "has-session",
.alias = "has",

.args = { "t:", 0, 0 },
.args = { "t:", 0, 0, NULL },
.usage = CMD_TARGET_SESSION_USAGE,

.target = { 't', CMD_FIND_SESSION, 0 },
Expand Down
Loading

0 comments on commit 08e6360

Please sign in to comment.