commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Muñoz <>
Subject Re: [CLI] Required and Optional Groups
Date Fri, 28 Jul 2006 18:52:59 GMT

   Thanks for clearing this up somewhat. It seems to me that if the  
command line gets parsed correctly, the help formatter should be able  
to display it correctly using the same kind of mechanism.

-- MM

On Jul 28, 2006, at 2:45 AM, Andrew Shirley wrote:

> On Thu, Jul 27, 2006 at 11:44:12AM -0700, Miguel Muñoz wrote:
>> Andrew,
>> Thank you for the suggestion, but it didn't work. Although some of  
>> the info in my post was wrong. I claimed I was getting this:
>>       ShellCommand [-DB|-SCM|-SCW] [-s <source>]
>> I was actually getting this:
>>       ShellCommand [-DB|-SCM|-SCW -s <source>]
>> What I want hasn't changed:
>>       ShellCommand -DB|-SCM|-SCW [-s <source>]
> The problem is that the 'all' group is has a minimum of 0 and so gets
> square-bracketed. This is incorrect as we know that project group is
> required and so we will have to have at least one argument. I'm not
> really sure of a way to solve this, I think we will have to improve  
> the
> concept of when a group is optional. It will validate the arguments
> correctly and it is just the HelpFormatter which is incorrect. As an
> aside, I found that Groups aren't counted in thw minimum/maximum count
> and I think this is wrong as if they were counted, you could give it a
> hint by saying that all has a minimum of 1 (the project group) however
> as it stands, this would make -s required. I will file a bug about  
> these
> things shortly.
> Sorry this wasn't more helpful.
> Andrew Shirley
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


Miguel Muñoz


The Sun, with all those planets revolving around it and dependent on  
it, can still ripen a vine of grapes like it had nothing else to do  
in the world.

   -- Galileo


There are seven sins in the world.
     Wealth without work.
     Pleasure without conscience.
     Knowledge without character.
     Commerce without morality.
     Science without humanity.
     Worship without sacrifice.
     Politics without principle.

   -- Mohandas Gandhi


If tyranny and oppression come to this land, it will come in the  
guise of fighting a foreign enemy.

   -- James Madison

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message