]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 372445 via svnmerge from
authorAutomerge script <automerge@asterisk.org>
Thu, 6 Sep 2012 15:26:00 +0000 (15:26 +0000)
committerAutomerge script <automerge@asterisk.org>
Thu, 6 Sep 2012 15:26:00 +0000 (15:26 +0000)
file:///srv/subversion/repos/asterisk/branches/10

................
  r372445 | kmoore | 2012-09-06 09:29:35 -0500 (Thu, 06 Sep 2012) | 14 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@372470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 90f1a5e9ab340243f730e84be408e4f98db517cb..0f7c8c789305c964715513dcca980fe03bd1dc52 100644 (file)
@@ -7396,6 +7396,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;
 }