[ 
https://issues.apache.org/jira/browse/CLI-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Heger resolved CLI-124.
------------------------------

    Resolution: Fixed

A fix was applied in revision 681185.

So far HelpFormatter never displayed optional child groups in square brackets. 
I did not want to change this globally because existing code may rely on this 
behavior. So I added a new constant "DISPLAY_OPTIONAL_CHILD_GROUP" to 
DisplaySettings, which can be explicitly set in the properties of the 
HelpFormatter instance (the set returned by getFullUsageSettings()).

If this flag is added, optional child groups will be displayed in square 
brackets.

> HelpFormatter should be more cunning when deciding if a Group is Optional and 
> therefore square-bracketing it
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CLI-124
>                 URL: https://issues.apache.org/jira/browse/CLI-124
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: Help formatter
>            Reporter: Andrew Shirley
>            Assignee: Oliver Heger
>             Fix For: 2.0
>
>
> Currently all child groups are required to satisfy their constraints (defaul 
> is any thing goes) and so if you have a Group A as a child of Group B and set 
> a minimum of 1 on A then B is no longer Optional as A is not Optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to