mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
6d37984f4f
@ -130,7 +130,8 @@ cmd_show_options_one(struct cmd *self, struct cmdq_item *item,
|
|||||||
cmdq_error(item, "ambiguous option: %s", name);
|
cmdq_error(item, "ambiguous option: %s", name);
|
||||||
return (CMD_RETURN_ERROR);
|
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);
|
return (CMD_RETURN_NORMAL);
|
||||||
cmdq_error(item, "unknown option: %s", name);
|
cmdq_error(item, "unknown option: %s", name);
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
|
@ -403,6 +403,11 @@ options_match(const char *s, int *idx, int* ambiguous)
|
|||||||
name = options_parse(s, idx);
|
name = options_parse(s, idx);
|
||||||
namelen = strlen(name);
|
namelen = strlen(name);
|
||||||
|
|
||||||
|
if (*name == '@') {
|
||||||
|
*ambiguous = 0;
|
||||||
|
return (xstrdup(name));
|
||||||
|
}
|
||||||
|
|
||||||
found = NULL;
|
found = NULL;
|
||||||
for (oe = options_table; oe->name != NULL; oe++) {
|
for (oe = options_table; oe->name != NULL; oe++) {
|
||||||
if (strcmp(oe->name, name) == 0) {
|
if (strcmp(oe->name, name) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user