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

Parameter help text should include additional information #27

Closed
matkoch opened this issue Feb 28, 2018 · 2 comments
Closed

Parameter help text should include additional information #27

matkoch opened this issue Feb 28, 2018 · 2 comments
Milestone

Comments

@matkoch
Copy link
Member

matkoch commented Feb 28, 2018

The help text for parameters should provide additional standardized information. For instance:

  • Possible values if type is an enum
  • Default values
  • Separator character
@matkoch matkoch added this to the Backlog milestone Oct 30, 2018
@VolkmarR
Copy link
Contributor

VolkmarR commented May 1, 2019

I've build a small test script for this issue:

public enum BoolWithDefault { Default, True, False }

[Parameter()]
readonly int IntParam;
[Parameter()]
readonly BoolWithDefault EnumParam = BoolWithDefault.Default;
[Parameter(Separator = "#")]
readonly string[] StringArrayParam = new string[0];

Target Compile => _ => _
    .Executes(() =>
    {
        Console.WriteLine("Parameter Values");
        Console.WriteLine($"- IntParam: {IntParam}");
        Console.WriteLine($"- EnumParam: {EnumParam}");
        Console.WriteLine($"- StringArrayParam: {string.Join(" / ", StringArrayParam)}");
    });

The current Help output for these parameters is

--enum-param         <no description>
--int-param          <no description>
--string-array-param   <no description>

A more helpful output could look like this

--enum-param         The Enum values are 'Default', 'True', 'False'. The Default is 'Default'.
--int-param          The Default is 0.
--string-array-param   Array with '#' as separator. The Default is Empty.

I can investigate this issue further and probably solve it.

@AlexMountainBN
Copy link

Why is the PR still open? I would give it a try if there are still issues open on this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants