diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-02-11 10:57:03 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-02-13 11:33:15 -0500 |
commit | 3f9437377809a8c1476a1195474eb3178b2c7934 (patch) | |
tree | 74fd534bc18dcbaf3c7f13d561d647b24899a87d /main/ccss.c | |
parent | 5780492cd725858628c32b42d72152455f2525c3 (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 'main/ccss.c')
-rw-r--r-- | main/ccss.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/main/ccss.c b/main/ccss.c index 6c3e6cbee..f96d7aa1d 100644 --- a/main/ccss.c +++ b/main/ccss.c @@ -4566,11 +4566,9 @@ static char *complete_core_id(const char *line, const char *word, int pos, int s static char *handle_cc_kill(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { - static const char * const option[] = { "core", "all", NULL }; - switch (cmd) { case CLI_INIT: - e->command = "cc cancel"; + e->command = "cc cancel [core|all]"; e->usage = "Usage: cc cancel can be used in two ways.\n" " 1. 'cc cancel core [core ID]' will cancel the CC transaction with\n" @@ -4578,10 +4576,7 @@ static char *handle_cc_kill(struct ast_cli_entry *e, int cmd, struct ast_cli_arg " 2. 'cc cancel all' will cancel all active CC transactions.\n"; return NULL; case CLI_GENERATE: - if (a->pos == 2) { - return ast_cli_complete(a->word, option, a->n); - } - if (a->pos == 3) { + if (a->pos == 3 && !strcasecmp(a->argv[2], "core")) { return complete_core_id(a->line, a->word, a->pos, a->n); } return NULL; |