DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13937>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13937

Request that Options support hierarical options

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|commons-                    |[EMAIL PROTECTED]
                   |[EMAIL PROTECTED]      |



------- Additional Comments From [EMAIL PROTECTED]  2002-10-31 22:42 -------
Joe,

This is achieved through using the 'getArgs' and 'getArgsList' methods defined
on CommandLine and also by creating an Options object for each part.  So for the
example you specify you need three Options e.g.

Options1 = -t and -u
Options2 = -x and -y
Options3 = -a, -b and -c

String[] args = new String[] { "-t", "-x", "-y", "value" };

CommandLine cmd = parser.parse( args, Options1 );

CommandLine cmd2 = null;
if( cmd.hasOption( "t" ) ) {
    cmd2 = parser.parse( cmd.getArgs(), Options2 );
}
else if( cmd.hasOption( "-u" ) ) {
    cmd2 = parser.parse( cmd.getArgs(), Options3 );
}

So I am marking this as not being a bug.  If you have any other comments on this
then please add them to this bug.

Cheers,
-John K

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to