Complete aliases as well as commands.

This commit is contained in:
Nicholas Marriott 2020-04-29 19:55:20 +01:00
parent 7324442b42
commit 5af6943940

View File

@ -1376,6 +1376,11 @@ status_prompt_complete_list(u_int *size, const char *s, int at_start)
list = xreallocarray(list, (*size) + 1, sizeof *list);
list[(*size)++] = xstrdup((*cmdent)->name);
}
if ((*cmdent)->alias != NULL &&
strncmp((*cmdent)->alias, s, slen) == 0) {
list = xreallocarray(list, (*size) + 1, sizeof *list);
list[(*size)++] = xstrdup((*cmdent)->alias);
}
}
o = options_get_only(global_options, "command-alias");
if (o != NULL) {