summaryrefslogtreecommitdiffstats
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-22 21:02:28 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-22 21:02:28 +0100
commit9d450cc6d0c5406fddc0bcce932efcf198614b7f (patch)
tree1104f8175651403830f0e89a4f3f5127dd4531f6 /cmd-show-options.c
parente353d0cab33461614987a5642bfe10d519a76184 (diff)
parent5571d7a21c5dc920eb9d25336b5bb7b04d72fc9d (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r--cmd-show-options.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index a8bf597e..37a9ca7b 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -90,7 +90,14 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
window = (self->entry == &cmd_show_window_options_entry);
if (args->argc == 0) {
- options_scope_from_flags(args, window, fs, &oo, &cause);
+ scope = options_scope_from_flags(args, window, fs, &oo, &cause);
+ if (scope == OPTIONS_TABLE_NONE) {
+ if (args_has(args, 'q'))
+ return (CMD_RETURN_NORMAL);
+ cmdq_error(item, "%s", cause);
+ free(cause);
+ return (CMD_RETURN_ERROR);
+ }
return (cmd_show_options_all(self, item, oo));
}
argument = format_single(item, args->argv[0], c, s, wl, NULL);