aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-04-29 19:55:20 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-04-29 19:55:20 +0100
commit5af694394018940819c0734be9b5fd44df1bf857 (patch)
treede7c008f91ca6128ee1be15839f16061f3e92695 /status.c
parent7324442b42061c99182d4f864c9cde609e19858c (diff)
downloadrtmux-5af694394018940819c0734be9b5fd44df1bf857.tar.gz
rtmux-5af694394018940819c0734be9b5fd44df1bf857.tar.bz2
rtmux-5af694394018940819c0734be9b5fd44df1bf857.zip
Complete aliases as well as commands.
Diffstat (limited to 'status.c')
-rw-r--r--status.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/status.c b/status.c
index 0acf4233..712a93df 100644
--- a/status.c
+++ b/status.c
@@ -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) {