diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-01-04 02:03:41 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-01-04 02:03:41 +0000 |
commit | 96c37fa80a46e189b9b6535242aa1966f4d375c8 (patch) | |
tree | 38f3b6c86abbddd1388528b39f70380ee6661c54 /cmd-show-options.c | |
parent | 55346b0d103016e8ee633e08e41b8b977b5904ef (diff) | |
download | rtmux-96c37fa80a46e189b9b6535242aa1966f4d375c8.tar.gz rtmux-96c37fa80a46e189b9b6535242aa1966f4d375c8.tar.bz2 rtmux-96c37fa80a46e189b9b6535242aa1966f4d375c8.zip |
Now that parsing is common, merge some of the small, related commands
together to use the same code.
Also add some arguments (such as -n and -p) to some commands to match
existing commands.
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r-- | cmd-show-options.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c index a36bebdf..cc11ed64 100644 --- a/cmd-show-options.c +++ b/cmd-show-options.c @@ -39,6 +39,16 @@ const struct cmd_entry cmd_show_options_entry = { cmd_show_options_exec }; +const struct cmd_entry cmd_show_window_options_entry = { + "show-window-options", "showw", + "gt:", 0, 0, + "[-g] " CMD_TARGET_WINDOW_USAGE, + 0, + NULL, + NULL, + cmd_show_options_exec +}; + int cmd_show_options_exec(struct cmd *self, struct cmd_ctx *ctx) { @@ -53,7 +63,8 @@ cmd_show_options_exec(struct cmd *self, struct cmd_ctx *ctx) if (args_has(self->args, 's')) { oo = &global_options; table = server_options_table; - } else if (args_has(self->args, 'w')) { + } else if (args_has(self->args, 'w') || + self->entry == &cmd_show_window_options_entry) { table = window_options_table; if (args_has(self->args, 'g')) oo = &global_w_options; |