The `Description` field of `VersionOptionFromMemberAttribute` is unused.
siegfriedpammer opened this issue · 1 comments
siegfriedpammer commented
Describe the bug
The Description
field of VersionOptionFromMemberAttribute
is unused.
To Reproduce
Steps to reproduce the behavior:
- Using this version of the library: '3.1.0' and '4.0.0-beta.74'
- Use
using McMaster.Extensions.CommandLineUtils;
using System;
namespace HelpTextBug
{
[Command(Name = "xyz", Description = "Description")]
[HelpOption("-h|--help")]
[VersionOptionFromMember("-v|--version", Description = "This is never shown.",
MemberName = nameof(VersionText))]
class Program
{
public static int Main(string[] args) => CommandLineApplication.Execute<Program>(args);
public string VersionText => "This is the version text.";
private int OnExecute(CommandLineApplication app) => 0;
}
}
- With these arguments '--help'
Expected behavior
Options:
- -v|--version Show version information.
+ -v|--version This is never shown.
-h|--help Show help information.
natemcmaster commented
Seems like something that should be easy to fix. I would accept a pull request to fix it.