Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subcommands in Help print - Syntax review #129

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

BlackPhlox
Copy link

@BlackPhlox BlackPhlox commented Jun 30, 2024

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 BlackPhlox changed the title Added test for syntax review Subcommands in Help print - Syntax review Jun 30, 2024
@DamianReeves
Copy link

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.

@BlackPhlox
Copy link
Author

BlackPhlox commented Jul 3, 2024

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?

@patricktcoakley
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants