Branch command name not showing up in help text.
If I have an AddBranch as follows:
config.AddBranch("student", student =>
{
student.AddCommand<StudentAddCommand>("new")
.WithAlias("add")
.WithDescription("Add new student information.")
.WithExample(new[] { "student", "new", "--id", "1001" });
student.AddCommand<StudentViewCommand>("view")
.WithDescription("View student information by id.")
.WithExample(new[] { "student", "view", "--id", "1001" });
student.AddCommand<StudentListCommand>("list")
.WithDescription("View list of students.")
.WithExample(new[] { "student", "list" });
student.AddCommand<StudentDeleteCommand>("delete")
.WithAlias("del")
.WithDescription("Remove student from list.")
.WithExample(new[] { "student", "delete", "--id", "1001" });
});
The help text for this will only show a period in the COMMANDS section:
USAGE:
lesson [OPTIONS]
EXAMPLES: lesson student new --id 1001 lesson student view --id 1001 lesson student list lesson student delete --id 1001
OPTIONS: -h, --help Prints help information
COMMANDS: .
If however, you add a description to the student configurator, like: student.SetDescription("View, list, add or remove students.");
Then you get the help text that you would expect with the command name and description:
USAGE:
lesson [OPTIONS]
EXAMPLES: lesson student new --id 1001 lesson student view --id 1001 lesson student list lesson student delete --id 1001
OPTIONS: -h, --help Prints help information
COMMANDS: student View, list, add or remove students
If no description is given, I would still expect the "student" command to show in the COMMANDS section without a description.
@DarthPedro Thanks for reporting this. Will take a look once I have some spare time.
@DarthPedro This seems to be a problem that originates in Spectre.Console which Spectre.Cli has a dependency on. I will try to fix this asap.