[jboss-as7-dev] CLI arguments convention

Alexey Loubyansky alexey.loubyansky at redhat.com
Tue Apr 19 09:31:13 EDT 2011


It's not entirely consistent, at the moment. I'd like to get some 
feedback on it and what's more convenient for you.

An example of inconsistency

deploy my.war my_war_name.war my_war_runtime_name.war

here are three arguments: the deployment, the name and the runtime name. 
The last two are optional but if you want to specify them, you have to 
know the order in which they should appear.

On the other hand, there is, e.g. create-jms-cf which has lots of 
arguments and where it's impossible to learn all of them, so it looks like

create-jms-cf name=mycf entries=cf/mycf ...

In addition, it's kind of a proprietary convention. We discussed this 
with Max today and I'm looking into the GNU convention for command line 
arguments, i.e. adding '--' prefix for arg names. But also, to keep 
things simple, have arguments that don't require an arg name in front of 
them, e.g. in case of deploy, the following would be equivalent:

deploy --file=my.war --name=my_war_name.war 
--runtime-name=my_war_runtime_name.war

deploy my.war --name=my_war_name.war --my_war_runtime_name.war


And another point is the use of '='. Some command lines don't use it, e.g.

deploy --file my.war --name my_war_name.war --runtime-name 
my_war_runtime_name.war

and some do

deploy --file=my.war --name=my_war_name.war 
--runtime-name=my_war_runtime_name.war


Any preferences? Are there any other things you'd like to improve?


Thanks,
Alexey



More information about the jboss-as7-dev mailing list