Hi, What do you mean by "CLI does not interpret cmd"?
Now for the option types let me see what we could imagine to have a complete list: 1. -a, --aaa - no additional argument needed 2. -a xxx, -aaa xxx - additional argument needed 3. xxx - only argument All of those should be either required or optional. Finally you should be able to say: [-a|-b xx|-c xx] -d [-e xx] (-f xx|-g xx) yyy This means that: - the first group [...] is optional but if specified must be one of options in brackets - -d is mandatory - -e has argument and is optional - -f or -g is mandatory but only one can be specified - finally yyy is argument without option. I think that it should be possible to check if the conditions above are satisfied. Any thoughts on that? Best Regards, Slawek --- Juozas Baliuka <[EMAIL PROTECTED]> wrote: > Hi, > I have suggestion for CLI. CLI does not interpret > "cmd" and It is good. > But I think it can be useful to add some "CallBack" > interface and use it in > this way: > > options.addPredefinedOptions( > optionArrayOrSomeFilter ); > options.addOption(myOption,myHandler); > .......................................................... > options.parse( args);//invokes my handler, then > finds option in cmd > > it is possible to implement some samples or helpers > or handlers for > "standard" or predefined options like "help" > > At 02:10 AM 1/29/2002 -0800, you wrote: > >Hi, > > > >I was wondering what do you think if CLI were able > (or > >maybe is already :-) ) to automatically generate > some > >sort of "usage: ..." message - something you get > when > >doing: "man -h". > > > >Also, does CLI support sub-groups of options, for > >example: [-c|-f|-k|-w|-tZT device] -> all being > >mutually exclusive? > > > >Cheers, > >Slawek > > > >__________________________________________________ > >Do You Yahoo!? > >Great stuff seeking new owners in Yahoo! Auctions! > >http://auctions.yahoo.com > > > >-- > >To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > >For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
