commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Oxspring" <roxspr...@imapmail.org>
Subject Re: [CLI] Support for CVS style command line
Date Wed, 11 Jun 2003 14:46:22 GMT

----- Original Message ----- 
From: "John Keyes" <jbjk@mac.com>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Cc: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
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: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>


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


Mime
View raw message