aboutsummaryrefslogtreecommitdiff
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-01-07 15:02:38 +0000
committerTiago Cunha <tcunha@gmx.com>2011-01-07 15:02:38 +0000
commitca413cf270d001df59a13dc1978236b2de8261e4 (patch)
tree7280499432219903909d933b7dd2312b2e15846b /cmd-show-options.c
parentb2b5d88f3f828c5ac972097967a58a192cad4fca (diff)
downloadrtmux-ca413cf270d001df59a13dc1978236b2de8261e4.tar.gz
rtmux-ca413cf270d001df59a13dc1978236b2de8261e4.tar.bz2
rtmux-ca413cf270d001df59a13dc1978236b2de8261e4.zip
Sync OpenBSD patchset 831:
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.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index 4e3a72ab..4b44ab26 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-show-options.c,v 1.23 2011-01-07 14:45:34 tcunha Exp $ */
+/* $Id: cmd-show-options.c,v 1.24 2011-01-07 15:02:38 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;