dev@glassfish.java.net

Re: target as option or operand?

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Fri, 25 Jun 2010 20:50:49 -0700

Jane Young wrote on 06/25/2010 06:04 PM:
> Bill Shannon wrote:
>> Jane Young wrote on 06/25/10 04:28 PM:
>>>
>>> In v2, all the list-* commands take target as operand.
>>
>> Why don't they use --target, and take a name of the thing they list
>> as an operand?
> What do you mean by the name of the things?
>
> For example "list-jndi-resources <target>" lists the names of the
> jndi-resources in the target.

Right, but why isn't it "list-jndi-resources --target <target> <jndi-name>"?
And "list-applications --target <target> <application-name>"?

Ya, I know, you're thinking "why would I need the list command if I already
knew the name of the thing?" Well, it would tell you whether the thing
existed or not. And if you allowed patterns, it would only list those
things that matched the pattern. And if there were options like --verbose
it would only list the extra information for the named things.

Think "ls file".