From 3f9437377809a8c1476a1195474eb3178b2c7934 Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Sat, 11 Feb 2017 10:57:03 -0500 Subject: 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 --- apps/app_minivm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apps/app_minivm.c') 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 - */ + /* 0 - minivm; 1 - list; 2 - accounts; 3 - for; 4 - */ 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 ]\n" " Lists all mailboxes currently set up\n"; return NULL; case CLI_GENERATE: -- cgit v1.2.3