Index: main/manager.c =================================================================== --- main/manager.c (revision 68594) +++ main/manager.c (working copy) @@ -423,6 +423,26 @@ return ret; } +static char *complete_show_manuser(const char *line, const char *word, int pos, int state) +{ + struct ast_manager_user *user; + int l = strlen(word), which = 0; + char *ret = NULL; + + if (pos == 3) { + AST_LIST_LOCK(&users); + AST_LIST_TRAVERSE(&users, user, list) { + if (!strncasecmp(word, user->username, l) && ++which > state) { + ret = ast_strdup(user->username); + break; + } + } + AST_LIST_UNLOCK(&users); + } + + return ret; +} + static int check_manager_session_inuse(const char *name) { struct mansession *session = NULL; @@ -663,7 +683,7 @@ { { "manager", "show", "user", NULL }, handle_showmanager, "Display information on a specific manager user", - showmanager_help, NULL, NULL }, + showmanager_help, complete_show_manuser, NULL }, { { "manager", "debug", NULL }, handle_mandebug, "Show, enable, disable debugging of the manager code",