Create a JiraCommands class with at lease one Command
Compile the Main listed below.
Run: .\Demo.exe --help
Output will include: jira Sub commands can be used to query Jira.
notice that there is no mention of the j alias
Run: .\Demo.exe jira --help
Output displays the expected commands
Run: .\Demo.exe j --help
Output displays: 'j' is not a command.
Results
Expected Results
Expected to use j or jira interchangeably
Actual Results
can run jira command
cannot run j command
j alias does not appear in the help
Sample Code
internal class Program
{
static void Main()
{
var builder = CoconaApp.CreateBuilder();
var application = builder.Build();
application.AddSubCommand("jira", x =>
{
x.AddCommands<JiraCommands>();
})
.WithDescription("Sub commands can be used to query Jira.")
.WithAliases(new[] { "j" });
application.Run();
}
}
Environment
<TargetFramework>net8.0</TargetFramework>
<PackageReference Include="Cocona" Version="2.2.0" />
Steps To Reproduce
JiraCommands
class with at lease oneCommand
Main
listed below..\Demo.exe --help
jira Sub commands can be used to query Jira.
j
alias.\Demo.exe jira --help
.\Demo.exe j --help
'j' is not a command.
Results
Expected Results
j
orjira
interchangeablyActual Results
jira
commandj
commandj
alias does not appear in the helpSample Code