[jboss-as7-dev] the cli status

Max Rydahl Andersen max.andersen at redhat.com
Sat Mar 5 08:07:13 EST 2011


> It's not only about help. The whole thing is about distinguishing 
> between the commands and operations.

yes, sure; just using help as an example of a command.

Going forward I would assume "create-datasource", "remove-datasource", "list-servergroups" etc. would be defined which
would be much more convenient than having to tabcomplete/guess the longwinding (but useful for raw access) operation "api".

> I was thinking one of the way to do that would be to have a command mode 
> and an operation mode. So, if we get advanced enough with the commands 
> then perhaps it'll make the operation mode an exception or close to that.

using / to distinguish that sounds like a perfect way for me ?

I.e. possibly simply have an "eval" operation and "/" be its alias...

eval subsystem=web,connector=http:read-attribute(name=bytesReceived)

or 

/ subsystem=web,connector=http:read-attribute(name=bytesReceived)

> 
> So, in that case, I thought we would still use the prefix idea.

sure - or like a setcontext/sc or setprefix/sp maybe ?

[]
sc subsystem=web
[subsystem=web]
/connector=http:read-attribute(name=bytesReceived)

?

> 
> In the first approach, either commands or operations would require a 
> prefix (the same one) like it is currently done but with the possibility 
> to switch, i.e. you can switch to 'command mode' in which commands are 
> typed w/o a prefix and operations will require it.

not sure if its worth the complexity skipping typing a single / for the raw access.
but you could toggle it by using an empty / as a toggle between these.

> Another approach would be to assign different prefixes for both commands 
> (e.g. /) and operations (e.g. &, # or something). These prefixes can be 
> used explicitly to distinguish between commands and operations no matter 
> in which mode you are. But one of them could be made the default one and 
> optional. Again with the possibility to switch the modes if you like. 
> The default prefix could also be added to the command prompt to indicate 
> the current mode.

Once there are more highlevel commands/shortcuts I really don't think the raw
access would be used much IMO where prefixing with / wouldn't be a big issue.

/max

> Alexey
> 
> On 03/05/2011 01:15 AM, Max Rydahl Andersen wrote:
>> 
>> On Mar 5, 2011, at 24:46, Ales Justin wrote:
>> 
>>>> i.e. when starting a cli I would expect being able to type "help" ...not /help
>>> 
>>> What about "--help"?
>> 
>> in the interactive command line shell ? never seen that.
>> 
>> as command line argument sure; but otherwise no.
>> 
>> try use mvn shell, seam forge, any sql query tool like mysqlclient, well heck..just try use bash it doesn't require you to put special characters in front of your commands ..and filesystem (i.e. "low level operations") are accessed by putting a command/alias in front ;)
>> 
>> /max
>> 
>> 
>> 
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

/max
http://about.me/maxandersen







More information about the jboss-as7-dev mailing list