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

Duplicate short flag alias when 2 argument properties start with the same alphabet #74

Open
mysticmind opened this issue Dec 14, 2022 · 1 comment

Comments

@mysticmind
Copy link
Member

mysticmind commented Dec 14, 2022

If we take the example as below, both properties start with S and no custom flag alias are defined. For this case, s is being generated as the short flag alias for both the properties.

public class ProjectionInput
{
    [Description("If specified, only execute against the named Marten store. Does not apply with only one store")]
    public string StoreFlag { get; set; }
 
    [Description("If specified, use this shard timeout value for daemon")]
    public string ShardTimeoutFlag { get; set; }
}

I think for these cases, we should only add a long flag and ignore short flags. The workaround is to explicitly define the flag alias.

@jeremydmiller
Copy link
Member

You can disambiguate with an explicit attribute for [CommandAlias] to override the convention.

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

2 participants