mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
introduce a bit of regexp support in the internal CLI api.
Now you can specify a cli command as
"console autoanswer [on|off]"
which means the on|off argument is optional, or
"console {mute|unmute}"
which means the mute|unmute argument is mandatory.
The blocks in [] or {} do not necessarily need to be at the
end of the string.
Completions for the variant parts are generated automatically.
This should significantly simplify the implementation of
the various handlers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -174,7 +174,7 @@ struct ast_cli_entry {
|
||||
int inuse; /*!< For keeping track of usage */
|
||||
struct module *module; /*!< module this belongs to */
|
||||
char *_full_cmd; /*!< built at load time from cmda[] */
|
||||
|
||||
int cmdlen; /*!< len up to the first invalid char [<{% */
|
||||
/*! \brief This gets set in ast_cli_register()
|
||||
It then gets set to something different when the deprecated command
|
||||
is run for the first time (ie; after we warn the user that it's deprecated)
|
||||
|
||||
Reference in New Issue
Block a user