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

Option to add a help/description line to command and option groups #150

Open
eonu opened this issue Dec 28, 2023 · 4 comments
Open

Option to add a help/description line to command and option groups #150

eonu opened this issue Dec 28, 2023 · 4 comments
Assignees
Milestone

Comments

@eonu
Copy link

eonu commented Dec 28, 2023

While usually having a descriptive enough title for command/option groups is all you need, it can be useful to have an extra line just below the title, before the list of commands/options for a bit of extra information.

Using some Git commands as an example:

click.rich_click.COMMAND_GROUPS = {
    "git": [
        {
            "name": "Working area",
            "description": "Start a working area (see also: git help tutorial)",
            "commands": ["clone", "init"],
        },
        {
            "name": "Current changes",
            "description": "Work on the current change (see also: git help everyday)",
            "commands": ["add", "mv", "restore", "rm"],
        },
        {
            "name": "State",
            "description": "Examine the history and state (see also: git help revisions)",
            "commands": ["bisect", "diff", "grep", "log", "show", "status"]
        }
    ]
}

Happy to help on this!

@dwreeves
Copy link
Collaborator

dwreeves commented Dec 29, 2023

Makes sense to me! I fully endorse the inclusion of this with that exact API.

Feel free to work on this if you'd like, and we can introduce it as part of version 1.8.

@dwreeves
Copy link
Collaborator

I also see you have your own CLI tool named feud. It looks really neat! And it's an honor you are using our tool a a backend for your CLI framework.

Also, that's a very pretty README; I didn't know you could do all that on Github! 👀

@ewels
Copy link
Owner

ewels commented Dec 30, 2023

Agreed, this sounds like a great addition 👍🏻

It'd be great if it could support either markdown or rich, like some of the other help texts. I could imagine having some nice inline documentation that way 😊

@eonu
Copy link
Author

eonu commented Jan 4, 2024

I also see you have your own CLI tool named feud. It looks really neat! And it's an honor you are using our tool a a backend for your CLI framework.

Also, that's a very pretty README; I didn't know you could do all that on Github! 👀

Appreciate it! Would be quite a miserable package if not for all the great work done on rich-click!

@dwreeves dwreeves added this to the 1.9 milestone Apr 14, 2024
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

No branches or pull requests

3 participants