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

Command groups #1553 #5816

Closed
wants to merge 6 commits into from
Closed

Command groups #1553 #5816

wants to merge 6 commits into from

Conversation

Fiedzia
Copy link

@Fiedzia Fiedzia commented Nov 14, 2024

Group subcommands displayed in help (#1553)
This is for help only, does not affect matching.

I've done the builder part, still figuring out derive support.

Main idea:

Added concept of CommandGroups. Command group has a name, optional help heading,
and a list of commands it groups. Order of groups and commands in group determines order of display in usage help.

so that we can go from

Commands:
cmd1 ...
cmd2 ...
help ...

to

Commands:
help ...

Utility commands:
cmd1 ...
cmd2 ....

Nothing changes if groups aren't used. Group with no heading leaves a space between groups,
see tests for examples.

@epage epage marked this pull request as draft November 14, 2024 02:07
@epage
Copy link
Member

epage commented Nov 14, 2024

Before moving further with this PR, please address the help concern I raised in #1553. Also, for this PR, please keep in mind that I said this should mirror Args which is that there are help_headings. If we want to explore other ways of handling help_headings or additional features that require more, than that is a separate topic that needs to be addressed with both Args and Commands.

@Fiedzia Fiedzia closed this Nov 14, 2024
@Fiedzia Fiedzia deleted the command-groups branch November 14, 2024 22:34
@Fiedzia
Copy link
Author

Fiedzia commented Nov 14, 2024

Done differently now, see #5818

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.

2 participants