mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
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/asterisk: Correct and extend completions for 'core show file version.' * 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
This commit is contained in:
21
main/astmm.c
21
main/astmm.c
@@ -702,17 +702,12 @@ static char *handle_memory_atexit_list(struct ast_cli_entry *e, int cmd, struct
|
||||
{
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "memory atexit list";
|
||||
e->command = "memory atexit list {on|off}";
|
||||
e->usage =
|
||||
"Usage: memory atexit list {on|off}\n"
|
||||
" Enable dumping a list of still allocated memory segments at exit.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
if (a->pos == 3) {
|
||||
const char * const options[] = { "off", "on", NULL };
|
||||
|
||||
return ast_cli_complete(a->word, options, a->n);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -739,7 +734,7 @@ static char *handle_memory_atexit_summary(struct ast_cli_entry *e, int cmd, stru
|
||||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "memory atexit summary";
|
||||
e->command = "memory atexit summary {off|byline|byfunc|byfile}";
|
||||
e->usage =
|
||||
"Usage: memory atexit summary {off|byline|byfunc|byfile}\n"
|
||||
" Summary of still allocated memory segments at exit options.\n"
|
||||
@@ -751,11 +746,6 @@ static char *handle_memory_atexit_summary(struct ast_cli_entry *e, int cmd, stru
|
||||
" Note: byline, byfunc, and byfile are cumulative enables.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
if (a->pos == 3) {
|
||||
const char * const options[] = { "off", "byline", "byfunc", "byfile", NULL };
|
||||
|
||||
return ast_cli_complete(a->word, options, a->n);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1054,7 +1044,7 @@ static char *handle_memory_backtrace(struct ast_cli_entry *e, int cmd, struct as
|
||||
{
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "memory backtrace";
|
||||
e->command = "memory backtrace {on|off}";
|
||||
e->usage =
|
||||
"Usage: memory backtrace {on|off}\n"
|
||||
" Enable dumping an allocation backtrace with memory diagnostics.\n"
|
||||
@@ -1062,11 +1052,6 @@ static char *handle_memory_backtrace(struct ast_cli_entry *e, int cmd, struct as
|
||||
" can be CPU intensive.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
if (a->pos == 2) {
|
||||
const char * const options[] = { "off", "on", NULL };
|
||||
|
||||
return ast_cli_complete(a->word, options, a->n);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user