summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-12-28 09:40:28 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-12-28 09:40:28 +0000
commit4b2229565f01657984bd5f56729d6810eee2a7e7 (patch)
tree73045277650d4e1a6ac5e73f7ca88c53b0ab4201 /usr.bin/tmux
parent47a606757cb2ad14ea45e3816ec6d31f0da76bd6 (diff)
Do not list user options with show-hooks.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-show-options.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index 9d39fdd3351..2a0dd48a322 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.64 2020/05/16 16:02:24 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.65 2020/12/28 09:40:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -201,11 +201,13 @@ cmd_show_options_all(struct cmd *self, struct cmdq_item *item, int scope,
u_int idx;
int parent;
- o = options_first(oo);
- while (o != NULL) {
- if (options_table_entry(o) == NULL)
- cmd_show_options_print(self, item, o, -1, 0);
- o = options_next(o);
+ if (cmd_get_entry(self) != &cmd_show_hooks_entry) {
+ o = options_first(oo);
+ while (o != NULL) {
+ if (options_table_entry(o) == NULL)
+ cmd_show_options_print(self, item, o, -1, 0);
+ o = options_next(o);
+ }
}
for (oe = options_table; oe->name != NULL; oe++) {
if (~oe->scope & scope)