[asterisk-dev] show vs. list

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Oct 13 14:41:39 MST 2006


On Fri, Oct 13, 2006 at 02:34:08PM +0500, Anton wrote:
> Also note that CISCO has 1000 times more commands and that 
> was invented not to complicate life but to make it easier. 
> So short version only works while there is no competing 
> analogie so when you try "sho de" cisco won't proceed 
> since there is 2 alternatives

Tab completion works the same way: if this is the only alternative,
pressing tab will complete it. However I can easily check if there is
such a command without pressing Enter. So no functionality is added.

> "debugging" and "derived-config" so you must than be more 
> specific and do "sho deb" - so there is no second 
> alternative. and svn is not an example for the specific 
> case - since that behaviour is good for CLI while there is 
> a ton of commands. 

Try 'show application 'tab tab' in the Asterisk CLI. Then try 
'show application s' tab tab.


Well, one thing about the CLI: it should not be so hard-coded into
Asterisk.

The completion function is separate. And there is a well-defined
protocol for sending commands and reciving updates. One of those
commands (three of them, actually) allows you to complete commands.

So if you want to offer a better CLI, write one in your favorite
language that connects to /var/run/asterisk/asterisk.ctl .

> BTW is there CLI for svn? :)

It also has tab completion. Its quality depends on the exact bash
programmable completion function you use.

-- 
Tzafrir Cohen         sip:tzafrir at local.xorcom.com
icq#16849755          iax:tzafrir at local.xorcom.com
+972-50-7952406          jabber:tzafrir at jabber.org
tzafrir.cohen at xorcom.com     http://www.xorcom.com


More information about the asterisk-dev mailing list