ConsoleAppFramework icon indicating copy to clipboard operation
ConsoleAppFramework copied to clipboard

Subcommands in Help print - Syntax review

Open BlackPhlox opened this issue 1 year ago • 2 comments

Based on the discussion in #123. I have moved to using an app-based method to set the display of subcommands to :

app.SubcommandHelp(DisplayType.Default);

I want this PR to be an ongoing discussion to define all the possible cases in the test that should pass, before revising the generator. Input is very much appreciated.

I don't think it makes sense to move forward with #125 before this PR gets resolved.

BlackPhlox avatar Jun 30 '24 10:06 BlackPhlox

Not strictly concerning this change, but related. It would nice to expose a method that user code can call to show the help for a command. Currently I can't see how to do this without totally rebuilding the help.

DamianReeves avatar Jul 02 '24 23:07 DamianReeves

Not strictly concerning this change, but related. It would nice to expose a method that user code can call to show the help for a command. Currently I can't see how to do this without totally rebuilding the help.

@DamianReeves where in user code are you thinking of?

Something like this? :

// Program.cs
var app = ConsoleApp.Create();
app.Add<TestCommand>("test");
app.Run(args);

string testHelpOutput = app.GetHelp("test");

or via Dependency Injection in a command?

BlackPhlox avatar Jul 03 '24 11:07 BlackPhlox

Just bumping to see if this is still possible? I think both this and an exposed Help/Version method would be ideal.

patricktcoakley avatar Nov 21 '24 00:11 patricktcoakley

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar May 20 '25 00:05 github-actions[bot]