diff --git a/cmd-show-options.c b/cmd-show-options.c
index bdcd3e78..7ac7e455 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -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);