----- Original Message ----- 
From: "John Keyes" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Cc: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 1:56 PM
Subject: Re: [CLI] Support for CVS style command line


>
> >Eitherway the implementation should be a simple case of setting a few attributes on 
> >the HelpFormatter and supplying an alternate
> >Options object:
> >
> >    if(commandLine.hasOption("--help-commands")){
> >        // don't descend into suboptions
> >        helpFormatter.setDepth(0);
> >        // make sure aliases are displayed.
> >        helpFormatter.setDisplayCommandAlias(true);
> >        // display command help
> >        helpFormatter.printHelp(commandsGroup.getOptions());
> >    }
> >    else if(commandLine.hasOption("--help")){
> >        // display full help
> >        helpFormatter.printHelp(allOptions);
> >    }
> >
> >Of course this is based on my local HelpFormatter implementation; once it does a 
> >little more I'll submit it for inclusion.
> Does this mean you are currently implementing a HelpFormatter for CLI v2?
> Good man yourself :-)

Yep an implementation of HF2 will turn up eventually, it just tackles usage lines for 
now so its not up to much but the beginnings
are there and I've got ideas about doing main help section.

>
> I'm willing to hand this over to you for the time being if you are implementing
> a prototype of the alias functionality.  We can review the work when you feel
> it is of sufficient quality.

The "setDisplayCommandAlias(boolean)" is purely hypothetical at the moment, it 
illustrates the level of control I was planning on
offering but is beyond the implementation so far.  I haven't tackled Commands and 
aliases at all but I guess should put my code
where my mouth is.  I'll keep you posted on progress.

Rob

>
> Cheers,
> -John K
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to