summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-02-11 10:57:03 -0500
committerSean Bright <sean.bright@gmail.com>2017-02-13 11:33:15 -0500
commit3f9437377809a8c1476a1195474eb3178b2c7934 (patch)
tree74fd534bc18dcbaf3c7f13d561d647b24899a87d /apps
parent5780492cd725858628c32b42d72152455f2525c3 (diff)
cli: Fix various CLI documentation and completion issues
* app_minivm: Use built-in completion facilities to complete optional arguments. * app_voicemail: Use built-in completion facilities to complete optional arguments. * app_confbridge: Add missing colons after 'Usage' text. * chan_alsa: Use built-in completion facilities to complete optional arguments. * chan_sip: Use built-in completion facilities to complete optional arguments. Add completions for 'load' for 'sip show user', 'sip show peer', and 'sip qualify peer.' * chan_skinny: Correct and extend completions for 'skinny reset' and 'skinny show line.' * func_odbc: Correct completions for 'odbc read' and 'odbc write' * main/astmm: Use built-in completion facilities to complete arguments for 'memory' commands. * main/bridge: Correct completions for 'bridge kick.' * main/ccss: Use built-in completion facilities to complete arguments for 'cc cancel' command. * main/cli: Add 'all' completion for 'channel request hangup.' Correct completions for 'core set debug channel.' Correct completions for 'core show calls.' * main/pbx_app: Remove redundant completions for 'core show applications.' * main/pbx_hangup_handler: Remove unused completions for 'core show hanguphandlers all.' * res_sorcery_memory_cache: Add completion for 'reload' argument of 'sorcery memory cache stale' and properly implement. Change-Id: Iee58c7392f6fec34ad9d596109117af87697bbca
Diffstat (limited to 'apps')
-rw-r--r--apps/app_minivm.c8
-rw-r--r--apps/app_voicemail.c6
-rw-r--r--apps/confbridge/conf_config_parser.c12
3 files changed, 11 insertions, 15 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index a060ad183..4cc2f4796 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -3014,11 +3014,9 @@ static char *complete_minivm_show_users(const char *line, const char *word, int
struct minivm_account *vmu;
const char *domain = "";
- /* 0 - voicemail; 1 - list; 2 - accounts; 3 - for; 4 - <domain> */
+ /* 0 - minivm; 1 - list; 2 - accounts; 3 - for; 4 - <domain> */
if (pos > 4)
return NULL;
- if (pos == 3)
- return (state == 0) ? ast_strdup("for") : NULL;
wordlen = strlen(word);
AST_LIST_TRAVERSE(&minivm_accounts, vmu, list) {
if (!strncasecmp(word, vmu->domain, wordlen)) {
@@ -3040,9 +3038,9 @@ static char *handle_minivm_show_users(struct ast_cli_entry *e, int cmd, struct a
switch (cmd) {
case CLI_INIT:
- e->command = "minivm list accounts";
+ e->command = "minivm list accounts [for]";
e->usage =
- "Usage: minivm list accounts\n"
+ "Usage: minivm list accounts [for <domain>]\n"
" Lists all mailboxes currently set up\n";
return NULL;
case CLI_GENERATE:
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 37f8aa96f..3016f65ba 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -12745,11 +12745,9 @@ static char *complete_voicemail_show_users(const char *line, const char *word, i
struct ast_vm_user *vmu;
const char *context = "";
- /* 0 - show; 1 - voicemail; 2 - users; 3 - for; 4 - <context> */
+ /* 0 - voicemail; 1 - show; 2 - users; 3 - for; 4 - <context> */
if (pos > 4)
return NULL;
- if (pos == 3)
- return (state == 0) ? ast_strdup("for") : NULL;
wordlen = strlen(word);
AST_LIST_TRAVERSE(&users, vmu, list) {
if (!strncasecmp(word, vmu->context, wordlen)) {
@@ -12772,7 +12770,7 @@ static char *handle_voicemail_show_users(struct ast_cli_entry *e, int cmd, struc
switch (cmd) {
case CLI_INIT:
- e->command = "voicemail show users";
+ e->command = "voicemail show users [for]";
e->usage =
"Usage: voicemail show users [for <context>]\n"
" Lists all mailboxes currently set up\n";
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index 1749b585e..29d7b7f53 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -1371,7 +1371,7 @@ static char *handle_cli_confbridge_show_user_profiles(struct ast_cli_entry *e, i
case CLI_INIT:
e->command = "confbridge show profile users";
e->usage =
- "Usage confbridge show profile users\n";
+ "Usage: confbridge show profile users\n";
return NULL;
case CLI_GENERATE:
return NULL;
@@ -1401,7 +1401,7 @@ static char *handle_cli_confbridge_show_user_profile(struct ast_cli_entry *e, in
case CLI_INIT:
e->command = "confbridge show profile user";
e->usage =
- "Usage confbridge show profile user [<profile name>]\n";
+ "Usage: confbridge show profile user [<profile name>]\n";
return NULL;
case CLI_GENERATE:
if (a->pos == 4) {
@@ -1522,7 +1522,7 @@ static char *handle_cli_confbridge_show_bridge_profiles(struct ast_cli_entry *e,
case CLI_INIT:
e->command = "confbridge show profile bridges";
e->usage =
- "Usage confbridge show profile bridges\n";
+ "Usage: confbridge show profile bridges\n";
return NULL;
case CLI_GENERATE:
return NULL;
@@ -1554,7 +1554,7 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
case CLI_INIT:
e->command = "confbridge show profile bridge";
e->usage =
- "Usage confbridge show profile bridge <profile name>\n";
+ "Usage: confbridge show profile bridge <profile name>\n";
return NULL;
case CLI_GENERATE:
if (a->pos == 4) {
@@ -1706,7 +1706,7 @@ static char *handle_cli_confbridge_show_menus(struct ast_cli_entry *e, int cmd,
case CLI_INIT:
e->command = "confbridge show menus";
e->usage =
- "Usage confbridge show profile menus\n";
+ "Usage: confbridge show profile menus\n";
return NULL;
case CLI_GENERATE:
return NULL;
@@ -1740,7 +1740,7 @@ static char *handle_cli_confbridge_show_menu(struct ast_cli_entry *e, int cmd, s
case CLI_INIT:
e->command = "confbridge show menu";
e->usage =
- "Usage confbridge show menu [<menu name>]\n";
+ "Usage: confbridge show menu [<menu name>]\n";
return NULL;
case CLI_GENERATE:
if (a->pos == 3) {