Skip to content

Display default value in --help documentation from @effect/cli #6098

@mikkelal

Description

@mikkelal

What is the problem this feature would solve?

The current generated help documentation from --help does not display the default value you set with Options.withDefault().

Example:

const uppercase = Options.choiceWithValue("uppercase", [["true", true], ["false", false]]).pipe(Options.withDefault(false));

The help doc entry for this is currently:

--uppercase true | false

  One of the following: true, false

  This setting is optional.

What is the feature you are proposing to solve the problem?

Display the default value.

Something like this:

--uppercase true | false (default: false)

    One of the following: true, false

    This setting is optional.

What alternatives have you considered?

Currently you have to manually write it with Options.withDescription()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions