From: nicm Date: Sat, 21 Aug 2021 10:22:38 +0000 (+0000) Subject: Add args parsing callback for some future work, currently unused. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a51dead1c4d3ed85038c588391e643b117324e5a;p=openbsd Add args parsing callback for some future work, currently unused. --- diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c index f18a456fab7..a2541b8d433 100644 --- a/usr.bin/tmux/cmd-attach-session.c +++ b/usr.bin/tmux/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-attach-session.c,v 1.86 2021/08/13 06:52:51 nicm Exp $ */ +/* $OpenBSD: cmd-attach-session.c,v 1.87 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, diff --git a/usr.bin/tmux/cmd-bind-key.c b/usr.bin/tmux/cmd-bind-key.c index 904eb13c6d5..6508bf8b39e 100644 --- a/usr.bin/tmux/cmd-bind-key.c +++ b/usr.bin/tmux/cmd-bind-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-bind-key.c,v 1.39 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-bind-key.c,v 1.40 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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]]", diff --git a/usr.bin/tmux/cmd-break-pane.c b/usr.bin/tmux/cmd-break-pane.c index 4c248a2080b..a24c85bd35e 100644 --- a/usr.bin/tmux/cmd-break-pane.c +++ b/usr.bin/tmux/cmd-break-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-break-pane.c,v 1.59 2020/06/13 09:05:53 nicm Exp $ */ +/* $OpenBSD: cmd-break-pane.c,v 1.60 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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]", diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c index dd7c1c1d94c..74e4da3ab80 100644 --- a/usr.bin/tmux/cmd-capture-pane.c +++ b/usr.bin/tmux/cmd-capture-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-capture-pane.c,v 1.54 2020/06/01 09:43:00 nicm Exp $ */ +/* $OpenBSD: cmd-capture-pane.c,v 1.55 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2009 Jonathan Alvarado @@ -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, @@ -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 }, diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c index a03ef1f48d3..56580010211 100644 --- a/usr.bin/tmux/cmd-choose-tree.c +++ b/usr.bin/tmux/cmd-choose-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-choose-tree.c,v 1.48 2021/04/12 06:50:25 nicm Exp $ */ +/* $OpenBSD: cmd-choose-tree.c,v 1.49 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2012 Thomas Adam @@ -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]", @@ -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]", @@ -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]", @@ -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 }, diff --git a/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c index a155ef7018a..e65974e46e7 100644 --- a/usr.bin/tmux/cmd-command-prompt.c +++ b/usr.bin/tmux/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.58 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.59 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -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]", diff --git a/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c index 7013b2ffd9d..b87e3c1c153 100644 --- a/usr.bin/tmux/cmd-confirm-before.c +++ b/usr.bin/tmux/cmd-confirm-before.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-confirm-before.c,v 1.47 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-confirm-before.c,v 1.48 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -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, diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c index 0348b01941c..84b7521c74c 100644 --- a/usr.bin/tmux/cmd-copy-mode.c +++ b/usr.bin/tmux/cmd-copy-mode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-copy-mode.c,v 1.46 2020/04/13 14:46:04 nicm Exp $ */ +/* $OpenBSD: cmd-copy-mode.c,v 1.47 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 }, @@ -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 }, diff --git a/usr.bin/tmux/cmd-detach-client.c b/usr.bin/tmux/cmd-detach-client.c index a822cff8337..5b190e56afa 100644 --- a/usr.bin/tmux/cmd-detach-client.c +++ b/usr.bin/tmux/cmd-detach-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-detach-client.c,v 1.35 2020/04/13 20:51:57 nicm Exp $ */ +/* $OpenBSD: cmd-detach-client.c,v 1.36 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, @@ -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, diff --git a/usr.bin/tmux/cmd-display-menu.c b/usr.bin/tmux/cmd-display-menu.c index d6ae01f95d3..04d89a16b0c 100644 --- a/usr.bin/tmux/cmd-display-menu.c +++ b/usr.bin/tmux/cmd-display-menu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-display-menu.c,v 1.28 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-display-menu.c,v 1.29 2021/08/21 10:22:38 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -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 ...", @@ -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]", diff --git a/usr.bin/tmux/cmd-display-message.c b/usr.bin/tmux/cmd-display-message.c index 1884c3b4207..23baf27846b 100644 --- a/usr.bin/tmux/cmd-display-message.c +++ b/usr.bin/tmux/cmd-display-message.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-display-message.c,v 1.59 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-display-message.c,v 1.60 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -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]", diff --git a/usr.bin/tmux/cmd-display-panes.c b/usr.bin/tmux/cmd-display-panes.c index 69bc084a688..729b908f161 100644 --- a/usr.bin/tmux/cmd-display-panes.c +++ b/usr.bin/tmux/cmd-display-panes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-display-panes.c,v 1.41 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-display-panes.c,v 1.42 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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, diff --git a/usr.bin/tmux/cmd-find-window.c b/usr.bin/tmux/cmd-find-window.c index 712087bef34..27171d2b53b 100644 --- a/usr.bin/tmux/cmd-find-window.c +++ b/usr.bin/tmux/cmd-find-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-find-window.c,v 1.52 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-find-window.c,v 1.53 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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 }, diff --git a/usr.bin/tmux/cmd-if-shell.c b/usr.bin/tmux/cmd-if-shell.c index 6d071ff4b19..ec0394bada9 100644 --- a/usr.bin/tmux/cmd-if-shell.c +++ b/usr.bin/tmux/cmd-if-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-if-shell.c,v 1.77 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-if-shell.c,v 1.78 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -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]", diff --git a/usr.bin/tmux/cmd-join-pane.c b/usr.bin/tmux/cmd-join-pane.c index 923497c482f..a59dc9e2474 100644 --- a/usr.bin/tmux/cmd-join-pane.c +++ b/usr.bin/tmux/cmd-join-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-join-pane.c,v 1.48 2021/03/11 06:31:05 nicm Exp $ */ +/* $OpenBSD: cmd-join-pane.c,v 1.49 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2011 George Nachman @@ -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 }, @@ -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 }, diff --git a/usr.bin/tmux/cmd-kill-pane.c b/usr.bin/tmux/cmd-kill-pane.c index 1b845c19943..12b7270e7ce 100644 --- a/usr.bin/tmux/cmd-kill-pane.c +++ b/usr.bin/tmux/cmd-kill-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-pane.c,v 1.30 2020/05/16 16:20:59 nicm Exp $ */ +/* $OpenBSD: cmd-kill-pane.c,v 1.31 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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 }, diff --git a/usr.bin/tmux/cmd-kill-server.c b/usr.bin/tmux/cmd-kill-server.c index 3a5e2230e13..8b70be3d809 100644 --- a/usr.bin/tmux/cmd-kill-server.c +++ b/usr.bin/tmux/cmd-kill-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-server.c,v 1.19 2020/04/13 08:26:27 nicm Exp $ */ +/* $OpenBSD: cmd-kill-server.c,v 1.20 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, @@ -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, diff --git a/usr.bin/tmux/cmd-kill-session.c b/usr.bin/tmux/cmd-kill-session.c index a23933aa152..3d66400d604 100644 --- a/usr.bin/tmux/cmd-kill-session.c +++ b/usr.bin/tmux/cmd-kill-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-session.c,v 1.27 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-kill-session.c,v 1.28 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 }, diff --git a/usr.bin/tmux/cmd-kill-window.c b/usr.bin/tmux/cmd-kill-window.c index 0f1017e324a..f0ba5e63e13 100644 --- a/usr.bin/tmux/cmd-kill-window.c +++ b/usr.bin/tmux/cmd-kill-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-window.c,v 1.27 2020/07/04 14:24:02 nicm Exp $ */ +/* $OpenBSD: cmd-kill-window.c,v 1.28 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 }, @@ -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 }, diff --git a/usr.bin/tmux/cmd-list-buffers.c b/usr.bin/tmux/cmd-list-buffers.c index d16b687f8ac..c73bb2eb86d 100644 --- a/usr.bin/tmux/cmd-list-buffers.c +++ b/usr.bin/tmux/cmd-list-buffers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-buffers.c,v 1.38 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-list-buffers.c,v 1.39 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, diff --git a/usr.bin/tmux/cmd-list-clients.c b/usr.bin/tmux/cmd-list-clients.c index a6b5f852042..4994c665a95 100644 --- a/usr.bin/tmux/cmd-list-clients.c +++ b/usr.bin/tmux/cmd-list-clients.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-clients.c,v 1.37 2020/05/16 15:45:29 nicm Exp $ */ +/* $OpenBSD: cmd-list-clients.c,v 1.38 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 }, diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c index bdfcbacb61c..d52867add02 100644 --- a/usr.bin/tmux/cmd-list-keys.c +++ b/usr.bin/tmux/cmd-list-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-keys.c,v 1.65 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-list-keys.c,v 1.66 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, @@ -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, diff --git a/usr.bin/tmux/cmd-list-panes.c b/usr.bin/tmux/cmd-list-panes.c index 83fcbf6ce33..59e2263deb5 100644 --- a/usr.bin/tmux/cmd-list-panes.c +++ b/usr.bin/tmux/cmd-list-panes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-panes.c,v 1.36 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-list-panes.c,v 1.37 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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 }, diff --git a/usr.bin/tmux/cmd-list-sessions.c b/usr.bin/tmux/cmd-list-sessions.c index 0f5525c5330..3b9c2522dd4 100644 --- a/usr.bin/tmux/cmd-list-sessions.c +++ b/usr.bin/tmux/cmd-list-sessions.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-sessions.c,v 1.33 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-list-sessions.c,v 1.34 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, diff --git a/usr.bin/tmux/cmd-list-windows.c b/usr.bin/tmux/cmd-list-windows.c index 0a6c745cdf8..eb7bc9a45cd 100644 --- a/usr.bin/tmux/cmd-list-windows.c +++ b/usr.bin/tmux/cmd-list-windows.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-windows.c,v 1.47 2021/01/20 07:16:54 nicm Exp $ */ +/* $OpenBSD: cmd-list-windows.c,v 1.48 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 }, diff --git a/usr.bin/tmux/cmd-load-buffer.c b/usr.bin/tmux/cmd-load-buffer.c index b18e3949505..43d538c59d8 100644 --- a/usr.bin/tmux/cmd-load-buffer.c +++ b/usr.bin/tmux/cmd-load-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-load-buffer.c,v 1.63 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-load-buffer.c,v 1.64 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -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, diff --git a/usr.bin/tmux/cmd-lock-server.c b/usr.bin/tmux/cmd-lock-server.c index dd0222912ed..1feac03f834 100644 --- a/usr.bin/tmux/cmd-lock-server.c +++ b/usr.bin/tmux/cmd-lock-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-lock-server.c,v 1.30 2020/04/13 20:54:15 nicm Exp $ */ +/* $OpenBSD: cmd-lock-server.c,v 1.31 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -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, @@ -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 }, @@ -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, diff --git a/usr.bin/tmux/cmd-move-window.c b/usr.bin/tmux/cmd-move-window.c index efbc3255311..1cd4f10a835 100644 --- a/usr.bin/tmux/cmd-move-window.c +++ b/usr.bin/tmux/cmd-move-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-move-window.c,v 1.33 2020/06/13 09:05:53 nicm Exp $ */ +/* $OpenBSD: cmd-move-window.c,v 1.34 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -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 }, @@ -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 }, diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c index 337e0ffd728..1e9e9ccfa20 100644 --- a/usr.bin/tmux/cmd-new-session.c +++ b/usr.bin/tmux/cmd-new-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-session.c,v 1.141 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-new-session.c,v 1.142 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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]", @@ -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 }, diff --git a/usr.bin/tmux/cmd-new-window.c b/usr.bin/tmux/cmd-new-window.c index a6b1ff7fe04..282b6a8ac72 100644 --- a/usr.bin/tmux/cmd-new-window.c +++ b/usr.bin/tmux/cmd-new-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-window.c,v 1.93 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-new-window.c,v 1.94 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -38,7 +38,7 @@ const struct cmd_entry cmd_new_window_entry = { .name = "new-window", .alias = "neww", - .args = { "abc:de:F:kn:PSt:", 0, -1 }, + .args = { "abc:de:F:kn:PSt:", 0, -1, NULL }, .usage = "[-abdkPS] [-c start-directory] [-e environment] [-F format] " "[-n window-name] " CMD_TARGET_WINDOW_USAGE " [command]", diff --git a/usr.bin/tmux/cmd-paste-buffer.c b/usr.bin/tmux/cmd-paste-buffer.c index edd64740b26..e26727bdfee 100644 --- a/usr.bin/tmux/cmd-paste-buffer.c +++ b/usr.bin/tmux/cmd-paste-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-paste-buffer.c,v 1.40 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-paste-buffer.c,v 1.41 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_paste_buffer_entry = { .name = "paste-buffer", .alias = "pasteb", - .args = { "db:prs:t:", 0, 0 }, + .args = { "db:prs:t:", 0, 0, NULL }, .usage = "[-dpr] [-s separator] " CMD_BUFFER_USAGE " " CMD_TARGET_PANE_USAGE, diff --git a/usr.bin/tmux/cmd-pipe-pane.c b/usr.bin/tmux/cmd-pipe-pane.c index 2110bc9c409..bd1aa04cfc7 100644 --- a/usr.bin/tmux/cmd-pipe-pane.c +++ b/usr.bin/tmux/cmd-pipe-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-pipe-pane.c,v 1.57 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-pipe-pane.c,v 1.58 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -44,7 +44,7 @@ const struct cmd_entry cmd_pipe_pane_entry = { .name = "pipe-pane", .alias = "pipep", - .args = { "IOot:", 0, 1 }, + .args = { "IOot:", 0, 1, NULL }, .usage = "[-IOo] " CMD_TARGET_PANE_USAGE " [shell-command]", .target = { 't', CMD_FIND_PANE, 0 }, diff --git a/usr.bin/tmux/cmd-refresh-client.c b/usr.bin/tmux/cmd-refresh-client.c index 89dbe22b473..47023464930 100644 --- a/usr.bin/tmux/cmd-refresh-client.c +++ b/usr.bin/tmux/cmd-refresh-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-refresh-client.c,v 1.42 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-refresh-client.c,v 1.43 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_refresh_client_entry = { .name = "refresh-client", .alias = "refresh", - .args = { "A:B:cC:Df:F:lLRSt:U", 0, 1 }, + .args = { "A:B:cC:Df:F:lLRSt:U", 0, 1, NULL }, .usage = "[-cDlLRSU] [-A pane:state] [-B name:what:format] " "[-C XxY] [-f flags] " CMD_TARGET_CLIENT_USAGE " [adjustment]", diff --git a/usr.bin/tmux/cmd-rename-session.c b/usr.bin/tmux/cmd-rename-session.c index 7e18f84463a..baa596e4c80 100644 --- a/usr.bin/tmux/cmd-rename-session.c +++ b/usr.bin/tmux/cmd-rename-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-rename-session.c,v 1.34 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-rename-session.c,v 1.35 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_rename_session_entry = { .name = "rename-session", .alias = "rename", - .args = { "t:", 1, 1 }, + .args = { "t:", 1, 1, NULL }, .usage = CMD_TARGET_SESSION_USAGE " new-name", .target = { 't', CMD_FIND_SESSION, 0 }, diff --git a/usr.bin/tmux/cmd-rename-window.c b/usr.bin/tmux/cmd-rename-window.c index 5978c970475..9805ca95371 100644 --- a/usr.bin/tmux/cmd-rename-window.c +++ b/usr.bin/tmux/cmd-rename-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-rename-window.c,v 1.27 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-rename-window.c,v 1.28 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_rename_window_entry = { .name = "rename-window", .alias = "renamew", - .args = { "t:", 1, 1 }, + .args = { "t:", 1, 1, NULL }, .usage = CMD_TARGET_WINDOW_USAGE " new-name", .target = { 't', CMD_FIND_WINDOW, 0 }, diff --git a/usr.bin/tmux/cmd-resize-pane.c b/usr.bin/tmux/cmd-resize-pane.c index a2c818ae210..d782d850a52 100644 --- a/usr.bin/tmux/cmd-resize-pane.c +++ b/usr.bin/tmux/cmd-resize-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-resize-pane.c,v 1.49 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-resize-pane.c,v 1.50 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -36,7 +36,7 @@ const struct cmd_entry cmd_resize_pane_entry = { .name = "resize-pane", .alias = "resizep", - .args = { "DLMRTt:Ux:y:Z", 0, 1 }, + .args = { "DLMRTt:Ux:y:Z", 0, 1, NULL }, .usage = "[-DLMRTUZ] [-x width] [-y height] " CMD_TARGET_PANE_USAGE " " "[adjustment]", diff --git a/usr.bin/tmux/cmd-resize-window.c b/usr.bin/tmux/cmd-resize-window.c index dcf08208bc1..35af7da1a9c 100644 --- a/usr.bin/tmux/cmd-resize-window.c +++ b/usr.bin/tmux/cmd-resize-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-resize-window.c,v 1.6 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-resize-window.c,v 1.7 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2018 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_resize_window_entry = { .name = "resize-window", .alias = "resizew", - .args = { "aADLRt:Ux:y:", 0, 1 }, + .args = { "aADLRt:Ux:y:", 0, 1, NULL }, .usage = "[-aADLRU] [-x width] [-y height] " CMD_TARGET_WINDOW_USAGE " " "[adjustment]", diff --git a/usr.bin/tmux/cmd-respawn-pane.c b/usr.bin/tmux/cmd-respawn-pane.c index 44fc2841472..73d4e90d863 100644 --- a/usr.bin/tmux/cmd-respawn-pane.c +++ b/usr.bin/tmux/cmd-respawn-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-respawn-pane.c,v 1.35 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-respawn-pane.c,v 1.36 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_respawn_pane_entry = { .name = "respawn-pane", .alias = "respawnp", - .args = { "c:e:kt:", 0, -1 }, + .args = { "c:e:kt:", 0, -1, NULL }, .usage = "[-k] [-c start-directory] [-e environment] " CMD_TARGET_PANE_USAGE " [command]", diff --git a/usr.bin/tmux/cmd-respawn-window.c b/usr.bin/tmux/cmd-respawn-window.c index d8c1b7bdba3..abac7a744e3 100644 --- a/usr.bin/tmux/cmd-respawn-window.c +++ b/usr.bin/tmux/cmd-respawn-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-respawn-window.c,v 1.46 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-respawn-window.c,v 1.47 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_respawn_window_entry = { .name = "respawn-window", .alias = "respawnw", - .args = { "c:e:kt:", 0, -1 }, + .args = { "c:e:kt:", 0, -1, NULL }, .usage = "[-k] [-c start-directory] [-e environment] " CMD_TARGET_WINDOW_USAGE " [command]", diff --git a/usr.bin/tmux/cmd-rotate-window.c b/usr.bin/tmux/cmd-rotate-window.c index 2b256b4a11e..c539dea3821 100644 --- a/usr.bin/tmux/cmd-rotate-window.c +++ b/usr.bin/tmux/cmd-rotate-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-rotate-window.c,v 1.32 2021/03/11 06:31:05 nicm Exp $ */ +/* $OpenBSD: cmd-rotate-window.c,v 1.33 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -31,7 +31,7 @@ const struct cmd_entry cmd_rotate_window_entry = { .name = "rotate-window", .alias = "rotatew", - .args = { "Dt:UZ", 0, 0 }, + .args = { "Dt:UZ", 0, 0, NULL }, .usage = "[-DUZ] " CMD_TARGET_WINDOW_USAGE, .target = { 't', CMD_FIND_WINDOW, 0 }, diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c index 7c1cf405fdc..c533b28bdff 100644 --- a/usr.bin/tmux/cmd-run-shell.c +++ b/usr.bin/tmux/cmd-run-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-run-shell.c,v 1.75 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-run-shell.c,v 1.76 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -41,7 +41,7 @@ const struct cmd_entry cmd_run_shell_entry = { .name = "run-shell", .alias = "run", - .args = { "bd:Ct:", 0, 1 }, + .args = { "bd:Ct:", 0, 1, NULL }, .usage = "[-bC] [-d delay] " CMD_TARGET_PANE_USAGE " [shell-command]", .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c index 89b43ff2ac0..080555ec46c 100644 --- a/usr.bin/tmux/cmd-save-buffer.c +++ b/usr.bin/tmux/cmd-save-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-save-buffer.c,v 1.53 2021/08/20 19:50:16 nicm Exp $ */ +/* $OpenBSD: cmd-save-buffer.c,v 1.54 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -38,7 +38,7 @@ const struct cmd_entry cmd_save_buffer_entry = { .name = "save-buffer", .alias = "saveb", - .args = { "ab:", 1, 1 }, + .args = { "ab:", 1, 1, NULL }, .usage = "[-a] " CMD_BUFFER_USAGE " path", .flags = CMD_AFTERHOOK, @@ -49,7 +49,7 @@ const struct cmd_entry cmd_show_buffer_entry = { .name = "show-buffer", .alias = "showb", - .args = { "b:", 0, 0 }, + .args = { "b:", 0, 0, NULL }, .usage = CMD_BUFFER_USAGE, .flags = CMD_AFTERHOOK, diff --git a/usr.bin/tmux/cmd-select-layout.c b/usr.bin/tmux/cmd-select-layout.c index 1bab0326814..cbb6c7fa87a 100644 --- a/usr.bin/tmux/cmd-select-layout.c +++ b/usr.bin/tmux/cmd-select-layout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-select-layout.c,v 1.39 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-select-layout.c,v 1.40 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_select_layout_entry = { .name = "select-layout", .alias = "selectl", - .args = { "Enopt:", 0, 1 }, + .args = { "Enopt:", 0, 1, NULL }, .usage = "[-Enop] " CMD_TARGET_PANE_USAGE " [layout-name]", .target = { 't', CMD_FIND_PANE, 0 }, @@ -46,7 +46,7 @@ const struct cmd_entry cmd_next_layout_entry = { .name = "next-layout", .alias = "nextl", - .args = { "t:", 0, 0 }, + .args = { "t:", 0, 0, NULL }, .usage = CMD_TARGET_WINDOW_USAGE, .target = { 't', CMD_FIND_WINDOW, 0 }, @@ -59,7 +59,7 @@ const struct cmd_entry cmd_previous_layout_entry = { .name = "previous-layout", .alias = "prevl", - .args = { "t:", 0, 0 }, + .args = { "t:", 0, 0, NULL }, .usage = CMD_TARGET_WINDOW_USAGE, .target = { 't', CMD_FIND_WINDOW, 0 }, diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c index de9a381b7dc..62b48fd6842 100644 --- a/usr.bin/tmux/cmd-select-pane.c +++ b/usr.bin/tmux/cmd-select-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-select-pane.c,v 1.67 2021/08/12 19:47:05 nicm Exp $ */ +/* $OpenBSD: cmd-select-pane.c,v 1.68 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_select_pane_entry = { .name = "select-pane", .alias = "selectp", - .args = { "DdegLlMmP:RT:t:UZ", 0, 0 }, /* -P and -g deprecated */ + .args = { "DdegLlMmP:RT:t:UZ", 0, 0, NULL }, /* -P and -g deprecated */ .usage = "[-DdeLlMmRUZ] [-T title] " CMD_TARGET_PANE_USAGE, .target = { 't', CMD_FIND_PANE, 0 }, @@ -46,7 +46,7 @@ const struct cmd_entry cmd_last_pane_entry = { .name = "last-pane", .alias = "lastp", - .args = { "det:Z", 0, 0 }, + .args = { "det:Z", 0, 0, NULL }, .usage = "[-deZ] " CMD_TARGET_WINDOW_USAGE, .target = { 't', CMD_FIND_WINDOW, 0 }, diff --git a/usr.bin/tmux/cmd-select-window.c b/usr.bin/tmux/cmd-select-window.c index 9466be06f31..32b4821bf50 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.29 2020/10/19 06:39:28 nicm Exp $ */ +/* $OpenBSD: cmd-select-window.c,v 1.30 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_select_window_entry = { .name = "select-window", .alias = "selectw", - .args = { "lnpTt:", 0, 0 }, + .args = { "lnpTt:", 0, 0, NULL }, .usage = "[-lnpT] " CMD_TARGET_WINDOW_USAGE, .target = { 't', CMD_FIND_WINDOW, 0 }, @@ -46,7 +46,7 @@ const struct cmd_entry cmd_next_window_entry = { .name = "next-window", .alias = "next", - .args = { "at:", 0, 0 }, + .args = { "at:", 0, 0, NULL }, .usage = "[-a] " CMD_TARGET_SESSION_USAGE, .target = { 't', CMD_FIND_SESSION, 0 }, @@ -59,7 +59,7 @@ const struct cmd_entry cmd_previous_window_entry = { .name = "previous-window", .alias = "prev", - .args = { "at:", 0, 0 }, + .args = { "at:", 0, 0, NULL }, .usage = "[-a] " CMD_TARGET_SESSION_USAGE, .target = { 't', CMD_FIND_SESSION, 0 }, @@ -72,7 +72,7 @@ const struct cmd_entry cmd_last_window_entry = { .name = "last-window", .alias = "last", - .args = { "t:", 0, 0 }, + .args = { "t:", 0, 0, NULL }, .usage = CMD_TARGET_SESSION_USAGE, .target = { 't', CMD_FIND_SESSION, 0 }, diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c index 5ad130e4b46..5a53b1d1909 100644 --- a/usr.bin/tmux/cmd-send-keys.c +++ b/usr.bin/tmux/cmd-send-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-send-keys.c,v 1.67 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-send-keys.c,v 1.68 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_send_keys_entry = { .name = "send-keys", .alias = "send", - .args = { "FHlMN:Rt:X", 0, -1 }, + .args = { "FHlMN:Rt:X", 0, -1, NULL }, .usage = "[-FHlMRX] [-N repeat-count] " CMD_TARGET_PANE_USAGE " key ...", @@ -47,7 +47,7 @@ const struct cmd_entry cmd_send_prefix_entry = { .name = "send-prefix", .alias = NULL, - .args = { "2t:", 0, 0 }, + .args = { "2t:", 0, 0, NULL }, .usage = "[-2] " CMD_TARGET_PANE_USAGE, .target = { 't', CMD_FIND_PANE, 0 }, diff --git a/usr.bin/tmux/cmd-set-buffer.c b/usr.bin/tmux/cmd-set-buffer.c index f378d9ec33e..f90774459d1 100644 --- a/usr.bin/tmux/cmd-set-buffer.c +++ b/usr.bin/tmux/cmd-set-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-buffer.c,v 1.31 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-set-buffer.c,v 1.32 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_set_buffer_entry = { .name = "set-buffer", .alias = "setb", - .args = { "ab:t:n:w", 0, 1 }, + .args = { "ab:t:n:w", 0, 1, NULL }, .usage = "[-aw] " CMD_BUFFER_USAGE " [-n new-buffer-name] " CMD_TARGET_CLIENT_USAGE " data", @@ -45,7 +45,7 @@ const struct cmd_entry cmd_delete_buffer_entry = { .name = "delete-buffer", .alias = "deleteb", - .args = { "b:", 0, 0 }, + .args = { "b:", 0, 0, NULL }, .usage = CMD_BUFFER_USAGE, .flags = CMD_AFTERHOOK, diff --git a/usr.bin/tmux/cmd-set-environment.c b/usr.bin/tmux/cmd-set-environment.c index b039e7bbc71..e7af4e0374b 100644 --- a/usr.bin/tmux/cmd-set-environment.c +++ b/usr.bin/tmux/cmd-set-environment.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-environment.c,v 1.27 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-set-environment.c,v 1.28 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_set_environment_entry = { .name = "set-environment", .alias = "setenv", - .args = { "Fhgrt:u", 1, 2 }, + .args = { "Fhgrt:u", 1, 2, NULL }, .usage = "[-Fhgru] " CMD_TARGET_SESSION_USAGE " name [value]", .target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL }, diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c index b3667c53db3..0daa8665d02 100644 --- a/usr.bin/tmux/cmd-set-option.c +++ b/usr.bin/tmux/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-option.c,v 1.139 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-set-option.c,v 1.140 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -33,7 +33,7 @@ const struct cmd_entry cmd_set_option_entry = { .name = "set-option", .alias = "set", - .args = { "aFgopqst:uUw", 1, 2 }, + .args = { "aFgopqst:uUw", 1, 2, NULL }, .usage = "[-aFgopqsuUw] " CMD_TARGET_PANE_USAGE " option [value]", .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, @@ -46,7 +46,7 @@ const struct cmd_entry cmd_set_window_option_entry = { .name = "set-window-option", .alias = "setw", - .args = { "aFgoqt:u", 1, 2 }, + .args = { "aFgoqt:u", 1, 2, NULL }, .usage = "[-aFgoqu] " CMD_TARGET_WINDOW_USAGE " option [value]", .target = { 't', CMD_FIND_WINDOW, CMD_FIND_CANFAIL }, @@ -59,7 +59,7 @@ const struct cmd_entry cmd_set_hook_entry = { .name = "set-hook", .alias = NULL, - .args = { "agpRt:uw", 1, 2 }, + .args = { "agpRt:uw", 1, 2, NULL }, .usage = "[-agpRuw] " CMD_TARGET_PANE_USAGE " hook [command]", .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, diff --git a/usr.bin/tmux/cmd-show-environment.c b/usr.bin/tmux/cmd-show-environment.c index 697d152bb4d..e0fd0ddf3c3 100644 --- a/usr.bin/tmux/cmd-show-environment.c +++ b/usr.bin/tmux/cmd-show-environment.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-environment.c,v 1.27 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-show-environment.c,v 1.28 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -38,7 +38,7 @@ const struct cmd_entry cmd_show_environment_entry = { .name = "show-environment", .alias = "showenv", - .args = { "hgst:", 0, 1 }, + .args = { "hgst:", 0, 1, NULL }, .usage = "[-hgs] " CMD_TARGET_SESSION_USAGE " [name]", .target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL }, diff --git a/usr.bin/tmux/cmd-show-messages.c b/usr.bin/tmux/cmd-show-messages.c index 5f04e2c70b4..5833077d522 100644 --- a/usr.bin/tmux/cmd-show-messages.c +++ b/usr.bin/tmux/cmd-show-messages.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-messages.c,v 1.35 2020/05/16 16:50:55 nicm Exp $ */ +/* $OpenBSD: cmd-show-messages.c,v 1.36 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -40,7 +40,7 @@ const struct cmd_entry cmd_show_messages_entry = { .name = "show-messages", .alias = "showmsgs", - .args = { "JTt:", 0, 0 }, + .args = { "JTt:", 0, 0, NULL }, .usage = "[-JT] " CMD_TARGET_CLIENT_USAGE, .flags = CMD_AFTERHOOK|CMD_CLIENT_TFLAG, diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c index 25d46ab9d39..12b670065e5 100644 --- a/usr.bin/tmux/cmd-show-options.c +++ b/usr.bin/tmux/cmd-show-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-options.c,v 1.66 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-show-options.c,v 1.67 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -39,7 +39,7 @@ const struct cmd_entry cmd_show_options_entry = { .name = "show-options", .alias = "show", - .args = { "AgHpqst:vw", 0, 1 }, + .args = { "AgHpqst:vw", 0, 1, NULL }, .usage = "[-AgHpqsvw] " CMD_TARGET_PANE_USAGE " [option]", .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, @@ -52,7 +52,7 @@ const struct cmd_entry cmd_show_window_options_entry = { .name = "show-window-options", .alias = "showw", - .args = { "gvt:", 0, 1 }, + .args = { "gvt:", 0, 1, NULL }, .usage = "[-gv] " CMD_TARGET_WINDOW_USAGE " [option]", .target = { 't', CMD_FIND_WINDOW, CMD_FIND_CANFAIL }, @@ -65,7 +65,7 @@ const struct cmd_entry cmd_show_hooks_entry = { .name = "show-hooks", .alias = NULL, - .args = { "gpt:w", 0, 1 }, + .args = { "gpt:w", 0, 1, NULL }, .usage = "[-gpw] " CMD_TARGET_PANE_USAGE, .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, diff --git a/usr.bin/tmux/cmd-show-prompt-history.c b/usr.bin/tmux/cmd-show-prompt-history.c index b4b191b8ede..b5e369c6233 100644 --- a/usr.bin/tmux/cmd-show-prompt-history.c +++ b/usr.bin/tmux/cmd-show-prompt-history.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-prompt-history.c,v 1.1 2021/06/10 07:50:03 nicm Exp $ */ +/* $OpenBSD: cmd-show-prompt-history.c,v 1.2 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2021 Anindya Mukherjee @@ -31,7 +31,7 @@ const struct cmd_entry cmd_show_prompt_history_entry = { .name = "show-prompt-history", .alias = "showphist", - .args = { "T:", 0, 0 }, + .args = { "T:", 0, 0, NULL }, .usage = "[-T type]", .flags = CMD_AFTERHOOK, @@ -42,7 +42,7 @@ const struct cmd_entry cmd_clear_prompt_history_entry = { .name = "clear-prompt-history", .alias = "clearphist", - .args = { "T:", 0, 0 }, + .args = { "T:", 0, 0, NULL }, .usage = "[-T type]", .flags = CMD_AFTERHOOK, diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c index 37dbcd0fe73..adefe9e1a23 100644 --- a/usr.bin/tmux/cmd-source-file.c +++ b/usr.bin/tmux/cmd-source-file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-source-file.c,v 1.50 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-source-file.c,v 1.51 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha @@ -36,7 +36,7 @@ const struct cmd_entry cmd_source_file_entry = { .name = "source-file", .alias = "source", - .args = { "Fnqv", 1, -1 }, + .args = { "Fnqv", 1, -1, NULL }, .usage = "[-Fnqv] path ...", .flags = 0, diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index e5b82a6f215..ce8d934dcf8 100644 --- a/usr.bin/tmux/cmd-split-window.c +++ b/usr.bin/tmux/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.107 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.108 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -40,7 +40,7 @@ const struct cmd_entry cmd_split_window_entry = { .name = "split-window", .alias = "splitw", - .args = { "bc:de:fF:hIl:p:Pt:vZ", 0, -1 }, + .args = { "bc:de:fF:hIl:p:Pt:vZ", 0, -1, NULL }, .usage = "[-bdefhIPvZ] [-c start-directory] [-e environment] " "[-F format] [-l size] " CMD_TARGET_PANE_USAGE " [command]", diff --git a/usr.bin/tmux/cmd-swap-pane.c b/usr.bin/tmux/cmd-swap-pane.c index 511ae6fd815..e39b03125f6 100644 --- a/usr.bin/tmux/cmd-swap-pane.c +++ b/usr.bin/tmux/cmd-swap-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-swap-pane.c,v 1.39 2021/03/11 06:31:05 nicm Exp $ */ +/* $OpenBSD: cmd-swap-pane.c,v 1.40 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -32,7 +32,7 @@ const struct cmd_entry cmd_swap_pane_entry = { .name = "swap-pane", .alias = "swapp", - .args = { "dDs:t:UZ", 0, 0 }, + .args = { "dDs:t:UZ", 0, 0, NULL }, .usage = "[-dDUZ] " CMD_SRCDST_PANE_USAGE, .source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED }, diff --git a/usr.bin/tmux/cmd-swap-window.c b/usr.bin/tmux/cmd-swap-window.c index 41684791d2d..1bffcd5b691 100644 --- a/usr.bin/tmux/cmd-swap-window.c +++ b/usr.bin/tmux/cmd-swap-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-swap-window.c,v 1.27 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-swap-window.c,v 1.28 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -32,7 +32,7 @@ const struct cmd_entry cmd_swap_window_entry = { .name = "swap-window", .alias = "swapw", - .args = { "ds:t:", 0, 0 }, + .args = { "ds:t:", 0, 0, NULL }, .usage = "[-d] " CMD_SRCDST_WINDOW_USAGE, .source = { 's', CMD_FIND_WINDOW, CMD_FIND_DEFAULT_MARKED }, diff --git a/usr.bin/tmux/cmd-switch-client.c b/usr.bin/tmux/cmd-switch-client.c index 7665b23ef1e..8b6fecd1ea1 100644 --- a/usr.bin/tmux/cmd-switch-client.c +++ b/usr.bin/tmux/cmd-switch-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-switch-client.c,v 1.69 2021/08/13 06:52:51 nicm Exp $ */ +/* $OpenBSD: cmd-switch-client.c,v 1.70 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_switch_client_entry = { .name = "switch-client", .alias = "switchc", - .args = { "lc:EFnpt:rT:Z", 0, 0 }, + .args = { "lc:EFnpt:rT:Z", 0, 0, NULL }, .usage = "[-ElnprZ] [-c target-client] [-t target-session] " "[-T key-table]", diff --git a/usr.bin/tmux/cmd-unbind-key.c b/usr.bin/tmux/cmd-unbind-key.c index f05d2add130..f537fb57670 100644 --- a/usr.bin/tmux/cmd-unbind-key.c +++ b/usr.bin/tmux/cmd-unbind-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-unbind-key.c,v 1.33 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-unbind-key.c,v 1.34 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -32,7 +32,7 @@ const struct cmd_entry cmd_unbind_key_entry = { .name = "unbind-key", .alias = "unbind", - .args = { "anqT:", 0, 1 }, + .args = { "anqT:", 0, 1, NULL }, .usage = "[-anq] [-T key-table] key", .flags = CMD_AFTERHOOK, diff --git a/usr.bin/tmux/cmd-wait-for.c b/usr.bin/tmux/cmd-wait-for.c index f51d9e1be8c..819de5cf423 100644 --- a/usr.bin/tmux/cmd-wait-for.c +++ b/usr.bin/tmux/cmd-wait-for.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-wait-for.c,v 1.21 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: cmd-wait-for.c,v 1.22 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott @@ -34,7 +34,7 @@ const struct cmd_entry cmd_wait_for_entry = { .name = "wait-for", .alias = "wait", - .args = { "LSU", 1, 1 }, + .args = { "LSU", 1, 1, NULL }, .usage = "[-L|-S|-U] channel", .flags = 0, diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 07010cbb6be..5f997896964 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.1128 2021/08/21 08:44:59 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.1129 2021/08/21 10:22:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1366,10 +1366,12 @@ struct args_entry; RB_HEAD(args_tree, args_entry); /* Arguments parsing state. */ +typedef enum args_type (*args_parse_cb)(struct args *, u_int); struct args_parse { const char *template; int lower; int upper; + args_parse_cb cb; }; /* Command find structures. */