[asterisk-dev] Standardizing CLI commands across modules

Steve Edwards asterisk.org at sedwards.com
Tue Jul 13 15:56:30 CDT 2010


On Fri, 9 Jul 2010, Paul Belanger wrote:

> Had a discussion with Leif last week about a new type of bug within 
> Asterisk; Inconsistent.  A good example is within the CLI. For example, 
> we have '... show settings', '... show status' and '... status' CLI 
> commands.  3 different commands to provide the same output, default 
> settings for a module. Some examples: 'manager show settings', 'core 
> show settings', 'sip show settings' and 'cdr show status', 'cel show 
> status', and 'dnsmgr status', 'features show'

I'm a 1.2 Luddite attempting to leap into the 21st century and use 1.6.

I wanted to see my dialplan so I did the (perfectly obvious to me) 
following:

sedwards-desktop*CLI> show dialplan
No such command 'show dialplan' (type 'core show help show dialplan' for 
other possible commands)

sedwards-desktop*CLI> core show help show dialplan
No such command 'show dialplan'.

Beyond the obviously unhelpful help, <VERB> <FILTER or OPTION> <NOUN> 
seems perfectly obvious to me. Having to know the name of the module a 
command happens to live in before you can get help or use it seems 
counter-intuitive and user unfriendly. For example:

 	show settings (show all settings)
 	show manager settings
 	show sip settings

I've been advised that I can do all this voodoo using aliases, but I 
suspect I'll lose command completion or some other feature if I go down 
this path and I suspect I'm not the only one who finds the current CLI 
obtuse.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-dev mailing list