From cc8037b3d450fd5a6eb5f5d92f73846180bb3898 Mon Sep 17 00:00:00 2001 From: Kinsey Moore <kmoore@digium.com> Date: Thu, 6 Sep 2012 14:30:32 +0000 Subject: [PATCH] Ensure "rules" is tab-completable for "queue show" Previously, tabbing at the end of "queue show" produced a list of available queues about which information could be shown, but did not include an alternative command, "rules", to access information about queue rules. The "rules" item should now be shown in the list of tab-completable items. (closes issue AST-958) Reported-by: John Bigelow ........ Merged revisions 372444 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372445 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372446 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_queue.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/app_queue.c b/apps/app_queue.c index 8cc6cc1a5c..43e30ccbfa 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -8075,6 +8075,12 @@ static char *complete_queue(const char *line, const char *word, int pos, int sta } ao2_iterator_destroy(&queue_iter); + /* Pretend "rules" is always at the end of the queues list since it is + * an alternate command that should be tab-completable */ + if (!ret && which == state && !wordlen) { + ret = ast_strdup("rules"); + } + return ret; } -- GitLab