[asterisk-dev] RFC: internal CLI changes

Steve Edwards asterisk.org at sedwards.com
Fri Nov 17 16:52:13 MST 2006


On Fri, 17 Nov 2006, Luigi Rizzo wrote:

> unfortunately, the way the code is now, it is non
> trivial to implement tab completion at the middle of the string.
> So don't expect this feature any time soon (at least not from me!)

If you are entertaining CLI ideas, how about a more "natural language" 
interface?

Changes have been implemented in 1.4, but they appear to be oriented more 
towards a developer than a user. The commands have been organized into 
categories that probably make sense to someone inside looking out while 
most users (and most CLI's) work from the outside looking in.

I agree that the 1.2 interface needed "improvement," but I think the 1.4 
changes are in the wrong direction.

A command that follows:

 	verb [adjective] noun

makes more sense to most users (my assumption) than:

 	[category] object action

For example:

 	show channels

seems more obvious and natural than:

 	channel list

The 1.4 interface becomes more inconsistent when you add optional 
components. For example:

 	show iax2 channels

versus

 	iax2 list channel

Why does the addition of the category cause the action and object to 
switch places?

Another example. Only someone with a somewhat intimate knowledge of the 
code would know that "show translation" is a "core category" command and 
needs to be prefixed with the "core" keyword while "show parkedcalls" is 
not considered to be "core functionality" and cannot have the "core" 
prefix.

Not to belabor the 1.4 inconsistencies, but shouldn't the above 2 commands 
be "core translation show" and "parkedcalls show?"

>From a usability standpoint, if I want asterisk to show me something, it 
seems obvious to type "show" and press <TAB> to be presented with a list 
of my options. If I don't know how the option has been categorized, where 
do I start? Always with the "help" command? Or will the "help" command be 
categorized as "core" and follow the 1.4 interface ("core help core 
translation show") so we will have to know the answer before we can ask 
the question? :)

Many (most?) application CLI's follow "verb [adjective] noun". Why does 
Asterisk need to be different?

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