Skip to content

Need ability to influence formatting of enum argument suggestions #685

Closed
@eiriktsarpalis

Description

@eiriktsarpalis

Supposing I added a CLI argument that takes the following enum:

enum Argument { Foo, Bar, Baz }

var argument = new Argument<Argument>("argument", Argument.Baz);

The help text for the particular argument would render as follows:

--option <Foo|Bar|Baz>

I'd like the enum value suggestions to format using camel case, however the only way I can achieve this at the moment is by changing the enum identifiers:

enum Argument { foo, bar, baz }

However this style violates C# coding conventions. Would it be possible to expose a mechanism that controls this? One approach could be using attributes to override the identifiers:

enum Argument { [Description("foo")]Foo, [Description("bar")]Bar, [Description("baz")]Baz }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CompletionsRelated to support for tab completionenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions