Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option groups #486

Merged
merged 12 commits into from
Sep 3, 2024
Merged

Add Option groups #486

merged 12 commits into from
Sep 3, 2024

Commits on Jul 22, 2024

  1. Add Parser groups, similar to Command groups

    Adds the ability to group options together, similar to command
    groups. The parser groups semantics are:
    
    1. Consecutive duplicate groups are merged.
    2. Non-consecutive duplicate groups are __not__ merged.
    3. Nested groups are concatenated together e.g. if "Group B" is parsed
       within "Group A", then B's options will render under
       "Group A.Group B".
    
    1 and 2 is the same behavior as Command groups.
    tbidne authored and HuwCampbell committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    2403294 View commit details
    Browse the repository at this point in the history
  2. Remove redundant imports

    HuwCampbell committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    8a41abe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0e0e43a View commit details
    Browse the repository at this point in the history
  4. Declare mappend

    HuwCampbell committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    c1c5037 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Revert copy/paste mistake

    The (<<+>>) operator was swapped for (<</>>) in c1bf93b to fix pcapriotti#360. This was
    mistakenly reverted when implementing the new rendering logic for option
    groups. This commit re-establishes the fix.
    tbidne committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    6cc042b View commit details
    Browse the repository at this point in the history
  2. Fix build for GHC < 8.4

    tbidne committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    8e8032c View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    8214451 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f15b95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8fa2d94 View commit details
    Browse the repository at this point in the history
  4. Small, non-functional changes

    Fixup help text.
    Move worker function to where it's used.
    Remove Applicative do from test suite.
    Small tidies.
    HuwCampbell committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    441c7b4 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Handle parent groups without top-level options

    It is possible that someone defines a "parent group" that only contains
    child group(s) i.e. it does not contain any top-level options. This is
    a problem, because the parent name will not be attached to any
    options, thus will not be printed.
    
    To fix this, we instead represent the Option Groups as a hierarchy
    list of group titles e.g. ["Parent 1", "Parent 2", "Child group"].
    
    Then, when rendering, we keep track of which group titles have already
    been printed. If some group has parent titles that have not yet been
    printed, we prepend their titles to the normal output.
    tbidne committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    ff8525e View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Configuration menu
    Copy the full SHA
    db1f771 View commit details
    Browse the repository at this point in the history