mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-07 05:39:39 +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:
@@ -19527,7 +19527,7 @@ static char *sip_show_inuse(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
|
||||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "sip show inuse";
|
||||
e->command = "sip show inuse [all]";
|
||||
e->usage =
|
||||
"Usage: sip show inuse [all]\n"
|
||||
" List all SIP devices usage counters and limits.\n"
|
||||
@@ -19717,7 +19717,7 @@ static char *sip_show_users(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
|
||||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "sip show users";
|
||||
e->command = "sip show users [like]";
|
||||
e->usage =
|
||||
"Usage: sip show users [like <pattern>]\n"
|
||||
" Lists all known SIP users.\n"
|
||||
@@ -19856,7 +19856,7 @@ static char *sip_show_peers(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
|
||||
{
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "sip show peers";
|
||||
e->command = "sip show peers [like]";
|
||||
e->usage =
|
||||
"Usage: sip show peers [like <pattern>]\n"
|
||||
" Lists all known SIP peers.\n"
|
||||
@@ -20570,7 +20570,12 @@ static char *sip_show_peer(struct ast_cli_entry *e, int cmd, struct ast_cli_args
|
||||
" Option \"load\" forces lookup of peer in realtime storage.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
return complete_sip_show_peer(a->line, a->word, a->pos, a->n);
|
||||
if (a->pos == 4) {
|
||||
static const char * const completions[] = { "load", NULL };
|
||||
return ast_cli_complete(a->word, completions, a->n);
|
||||
} else {
|
||||
return complete_sip_show_peer(a->line, a->word, a->pos, a->n);
|
||||
}
|
||||
}
|
||||
return _sip_show_peer(0, a->fd, NULL, NULL, a->argc, (const char **) a->argv);
|
||||
}
|
||||
@@ -20740,7 +20745,12 @@ static char *sip_qualify_peer(struct ast_cli_entry *e, int cmd, struct ast_cli_a
|
||||
" Option \"load\" forces lookup of peer in realtime storage.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
return complete_sip_show_peer(a->line, a->word, a->pos, a->n);
|
||||
if (a->pos == 4) {
|
||||
static const char * const completions[] = { "load", NULL };
|
||||
return ast_cli_complete(a->word, completions, a->n);
|
||||
} else {
|
||||
return complete_sip_show_peer(a->line, a->word, a->pos, a->n);
|
||||
}
|
||||
}
|
||||
return _sip_qualify_peer(0, a->fd, NULL, NULL, a->argc, (const char **) a->argv);
|
||||
}
|
||||
@@ -21111,7 +21121,12 @@ static char *sip_show_user(struct ast_cli_entry *e, int cmd, struct ast_cli_args
|
||||
" Option \"load\" forces lookup of peer in realtime storage.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
return complete_sip_show_user(a->line, a->word, a->pos, a->n);
|
||||
if (a->pos == 4) {
|
||||
static const char * const completions[] = { "load", NULL };
|
||||
return ast_cli_complete(a->word, completions, a->n);
|
||||
} else {
|
||||
return complete_sip_show_user(a->line, a->word, a->pos, a->n);
|
||||
}
|
||||
}
|
||||
|
||||
if (a->argc < 4)
|
||||
|
Reference in New Issue
Block a user