aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd-show-options.c3
-rw-r--r--options.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index ac5823b6..c7621cb8 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -130,7 +130,8 @@ cmd_show_options_one(struct cmd *self, struct cmdq_item *item,
cmdq_error(item, "ambiguous option: %s", name);
return (CMD_RETURN_ERROR);
}
- if (options_match_get(oo, name, &idx, 0, &ambiguous) != NULL)
+ if (*name != '@' &&
+ options_match_get(oo, name, &idx, 0, &ambiguous) != NULL)
return (CMD_RETURN_NORMAL);
cmdq_error(item, "unknown option: %s", name);
return (CMD_RETURN_ERROR);
diff --git a/options.c b/options.c
index 9c260e26..4f6aa6fe 100644
--- a/options.c
+++ b/options.c
@@ -403,6 +403,11 @@ options_match(const char *s, int *idx, int* ambiguous)
name = options_parse(s, idx);
namelen = strlen(name);
+ if (*name == '@') {
+ *ambiguous = 0;
+ return (xstrdup(name));
+ }
+
found = NULL;
for (oe = options_table; oe->name != NULL; oe++) {
if (strcmp(oe->name, name) == 0) {