[asterisk-dev] show vs. list

Chris Lee cslee-list at cybericom.co.uk
Fri Oct 13 00:13:19 MST 2006



Luigi Rizzo wrote:
> On Thu, Oct 12, 2006 at 06:36:32PM -1000, sam at bingner.com wrote:
>> I recently was looking at the changes made in 1.4 to add 'list' in  
>> certain instances over 'show' in the CLI.   I would suggest  
>> standardizing on 'show' for anything that's displaying information, be  
>> it a list or not.  The addition of the option to have 'list'  
> 
> i find the difference confusing too, maybe it's because i was too used
> to the old interface...
> 
> I am also not particularly happy about the addition of prefixes
> ("console", "core") to several commands, that make it harder to type
> them. Here I probably understand the motivations a bit more - reduce
> the chance of namespace collisions.
> 
Maybe it would help if the CLI had a "tree structure" so you could 
change to "core" or "console" to work with those commands;
Something like:
bob*CLI> core
bob*CLI*core> command
...
bob*CLI*core> return
bob*CLI*>

I would prefer it, if that were the case, to have technology based name 
spaces and activity based name spaces to work inside.
Some commands may appear in both but if you are in a name space for a 
reason the commands available should be relatively clear.
If I want to run something in a name space directly I should also be 
able to run it using namespace.command to short circuit the process.

> In truth, i have to say that i did not follow the discussion (if
> any) that led to these changes so there might have been good reasons
> for them. Still, i think your final comment is very appropriate:
> 
> 	the goal of the CLI is to be as simple and intuitive as possible 
> 
> cheers
> luigi
> 
> on the other hand i have not followed the list closely when the change
> was made, maybe there was some good argument
>> obfuscates the interface in that it may not be as simple to intuit the  
>> command necessary to perform a specific action.   For instance, would  
>> we want "iax2 show stats" or "iax2 list stats"?  It's technically a  
>> list of statistics being displayed, but I expect most people would  
>> expect it to appear in 'show'.   And 'database show' or 'database  
>> list'?  Are you showing the contents of a database, or listing the  
>> contents of a database?  Does it really matter?
>>
>> While 'list' may be correct when displaying a list, 'show' is not  
>> necessarily incorrect when showing the contents of a list and would  
>> eliminate one possible point of confusion.  In short, is the goal of  
>> the CLI to be as simple and intuitive as possible or to use the most  
>> proper english possible on every command?
>>
>>
>> Sam

I also think show and list is too much confusion.
If there are two ways to display the data then show should have a 
modifier available to it, show does normal output and show as list shows 
it in a different form if there is one or the same form if there is none.

My 2.2 cents.

Chris.


More information about the asterisk-dev mailing list