summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-10-21 08:23:49 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-10-21 08:23:49 +0000
commitdeb5a86e45dae6ddbd35b2fc373fb617d183dbd2 (patch)
treea698a7998822d8f981f865345b7e1b057cf10e12 /usr.bin/tmux
parent0f250b91e3fd2349f22c74ebc1696bb74a207130 (diff)
Show error if user option doesn't exist, GitHub issue 2938.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-show-options.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index 12b670065e5..f5c981cb1ce 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.67 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.68 2021/10/21 08:23:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -127,6 +127,12 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
parent = 0;
if (o != NULL)
cmd_show_options_print(self, item, o, idx, parent);
+ else if (*name == '@') {
+ if (args_has(args, 'q'))
+ goto fail;
+ cmdq_error(item, "invalid option: %s", argument);
+ goto fail;
+ }
free(name);
free(argument);