Skip to content

documentation formatting wrong for groups with only value options #58

@NikolausDemmel

Description

@NikolausDemmel

Code:

auto cli = (option("--a") & value("A") % "help a", option("-b") & value("B") % "help b") % "group 1";
std::cout << make_man_page(cli, "test");

Expected:

SYNOPSIS
        test [--a <A>] [-b <B>]

OPTIONS
        group 1
            <A>     help a
            <B>     help b

Actual:

SYNOPSIS
        test [--a <A>] [-b <B>]

OPTIONS
        [--a <A>] [-b <B>]
                    group 1

This works fine:

auto cli = (option("--a") & value("A") % "help a", option("-b") % "help b") % "group 1";
std::cout << make_man_page(cli, "test");
SYNOPSIS
        test [--a <A>] [-b]

OPTIONS
        group 1
            <A>     help a
            -b      help b

live example: https://wandbox.org/permlink/m9OeLGfP7ZDiOjD1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions