diff --git a/src/CommandLine/Text/HelpText.cs b/src/CommandLine/Text/HelpText.cs index 3894bc9d..f5e9a7b9 100644 --- a/src/CommandLine/Text/HelpText.cs +++ b/src/CommandLine/Text/HelpText.cs @@ -851,8 +851,8 @@ private IEnumerable AdaptVerbsToSpecifications(IEnumerable var optionSpecs = from verbTuple in Verb.SelectFromTypes(types) select OptionSpecification.NewSwitch( - verbTuple.Item1.Name, - verbTuple.Item1.Aliases.ToDelimitedString(", "), + string.Empty, + verbTuple.Item1.Name.Concat(verbTuple.Item1.Aliases).ToDelimitedString(", "), false, verbTuple.Item1.IsDefault ? "(Default Verb) " + verbTuple.Item1.HelpText : verbTuple.Item1.HelpText, //Default verb string.Empty, diff --git a/tests/CommandLine.Tests/Unit/Issue6Tests.cs b/tests/CommandLine.Tests/Unit/Issue6Tests.cs index 224ba41a..2f6ea3f4 100644 --- a/tests/CommandLine.Tests/Unit/Issue6Tests.cs +++ b/tests/CommandLine.Tests/Unit/Issue6Tests.cs @@ -89,17 +89,17 @@ public void Parse_option_with_aliased_verb(string args, Type expectedArgType) { "copy, cp, cpy (Default Verb) Copy some stuff", "move, mv", - "delete Delete stuff", - "help Display more information on a specific command.", - "version Display version information.", + "delete Delete stuff", + "help Display more information on a specific command.", + "version Display version information.", })] [InlineData("help", true, new string[] { "copy, cp, cpy (Default Verb) Copy some stuff", "move, mv", - "delete Delete stuff", - "help Display more information on a specific command.", - "version Display version information.", + "delete Delete stuff", + "help Display more information on a specific command.", + "version Display version information.", })] [InlineData("move --help", false, new string[] { @@ -163,16 +163,16 @@ public void Parse_help_option_for_aliased_verbs(string args, bool verbsIndex, st [InlineData("--help", true, new string[] { "move, mv", - "delete Delete stuff", - "help Display more information on a specific command.", - "version Display version information.", + "delete Delete stuff", + "help Display more information on a specific command.", + "version Display version information.", })] [InlineData("help", true, new string[] { "move, mv", - "delete Delete stuff", - "help Display more information on a specific command.", - "version Display version information.", + "delete Delete stuff", + "help Display more information on a specific command.", + "version Display version information.", })] [InlineData("move --help", false, new string[] {