commandlineparser / commandlineparser/commandline

Seperator does not appear in help text when diplaying default values

Open
#490 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
4.8k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I have the following property in the options:

```
[Option("branch", Required = false, Separator = ',', HelpText = "Branches to include.",
Default = new[] { "master", "breakfix" })]
public IEnumerable IncludeBranches { get; set; }
```

The separator is set to ',' then a list of string is given for the default.

The help output is:

```
--branch (Default: master breakfix) Branches to include.
```

This would be miss-leading to the user since it does not include the comma. Would it instead make sense to do something like this?

```
--branch (Default: master,breakfix) Branches to include.
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the help output from the issue's Option configuration, focusing on how the default IEnumerable values are rendered when Separator is set to a comma. Trace the help-generation entry point that formats default values and verify that the completed output represents the configured separator without changing unrelated help text.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.