summaryrefslogtreecommitdiff
path: root/funcs
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:24:24 -0500
commitdc8dd56684c53230cf0eeac0f6f24f6e0df42b8e (patch)
treec68dea58476def9e16045148b43cd0328721b94f /funcs
parent0aecb8759b9c7a9de2bf95137b2f8deaa5d5eca6 (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 'funcs')
-rw-r--r--funcs/func_odbc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 224cd7a7f..bc892595c 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -1419,7 +1419,8 @@ static char *cli_odbc_read(struct ast_cli_entry *e, int cmd, struct ast_cli_args
AST_RWLIST_UNLOCK(&queries);
return NULL;
} else if (a->pos == 4) {
- return a->n == 0 ? ast_strdup("exec") : NULL;
+ static const char * const completions[] = { "exec", NULL };
+ return ast_cli_complete(a->word, completions, a->n);
} else {
return NULL;
}
@@ -1625,7 +1626,8 @@ static char *cli_odbc_write(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
AST_RWLIST_UNLOCK(&queries);
return NULL;
} else if (a->pos == 5) {
- return a->n == 0 ? ast_strdup("exec") : NULL;
+ static const char * const completions[] = { "exec", NULL };
+ return ast_cli_complete(a->word, completions, a->n);
} else {
return NULL;
}