summaryrefslogtreecommitdiffstats
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-12-10 16:59:02 +0000
committerTiago Cunha <tcunha@gmx.com>2009-12-10 16:59:02 +0000
commitdcdd2fb09497d9b568077afd0248f1f5156389f6 (patch)
treea608c55a40d668c5838d6138dc1e273450e50d61 /cmd-show-options.c
parent328861e330f7dac0c4d2c0bdbb58f59d2f5b78aa (diff)
Sync OpenBSD patchset 585:
Add "server options" which are server-wide and not bound to a session or window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r--cmd-show-options.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index 26d73e2a..50b3ffe9 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-show-options.c,v 1.20 2009-12-04 22:14:47 tcunha Exp $ */
+/* $Id: cmd-show-options.c,v 1.21 2009-12-10 16:59:02 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -31,8 +31,8 @@ int cmd_show_options_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_show_options_entry = {
"show-options", "show",
- "[-gw] [-t target-session|target-window]",
- 0, "gw",
+ "[-gsw] [-t target-session|target-window]",
+ 0, "gsw",
cmd_target_init,
cmd_target_parse,
cmd_show_options_exec,
@@ -52,7 +52,10 @@ cmd_show_options_exec(struct cmd *self, struct cmd_ctx *ctx)
const struct set_option_entry *entry;
const char *optval;
- if (cmd_check_flag(data->chflags, 'w')) {
+ if (cmd_check_flag(data->chflags, 's')) {
+ oo = &global_options;
+ table = set_option_table;
+ } else if (cmd_check_flag(data->chflags, 'w')) {
table = set_window_option_table;
if (cmd_check_flag(data->chflags, 'g'))
oo = &global_w_options;