admin@glassfish.java.net

Short Option Names

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Sat, 30 Apr 2011 16:01:18 -0700

I think we are underusing the short option names.

E.g.:

asadmin start-domain --debug
is the same as
asadmin start-domain -d

I think we ought to go back and add lots and lots of these handy
one-letter abbreviations. I don't see any down side to them. I see 2
reasons why they are so rare in V3, in order of importance (IMO)

(1) I don't know how to do that!
Bill made this very easy. Here is how start-domain does it:
@Param(optional = true, *shortName = "d"*, defaultValue = "false")
-- So now you /*DO */know how to do that!

(2) In V2 the commands and abbreviations were globally scoped so we had
to be penurious with one-letter abbreviations. Now the name-space is at
a command granularity. So we can use them much more frequently. E.g.
we can have a dozen commands define "-d" to be totally different things
without any clashing like in V2.

Users will like this and it is trivial to go back and add them to
existing commands.

-- 
Oracle <http://www.oracle.com>
Byron Nevins | Principal MTS
Phone: +1 6503958992 <tel:+1%206503958992>
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment