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

Display the default value of args in help #126

Closed
DevOpsCraftsman opened this issue Feb 14, 2023 · 2 comments
Closed

Display the default value of args in help #126

DevOpsCraftsman opened this issue Feb 14, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@DevOpsCraftsman
Copy link

Thanks for this absolutely wonderful lib!

Would it be possible to display the default value of an args in the help?

Example:

    [tool.poe.tasks.load]
    help = "Load base data"
    control.expr = "pack"

        [[tool.poe.tasks.load.args]]
        name = "pack"
        options = ["-p", "--pack"]
        help = "The amount of fixtures needed"
        default = "full"

        ...

Now the help displays:

  load           Load base data
    -p, --pack   The amount of fixtures needed

It would be useful to add this:

    -p, --pack   The amount of fixtures needed [Default: full]

I could write it by hand, but using directly the default is more DRY.

Thanks!

@nat-n
Copy link
Owner

nat-n commented Feb 15, 2023

Hi @yahya-abou-imran, Thanks for the feedback :)

I think this is a good idea. I'd like to overhaul how documentation works at some point to make it more detailed, but this is a step in the right direction. Feel free to submit a PR, otherwise I'll add it when I next have some time.

@nat-n nat-n added the enhancement New feature or request label Feb 15, 2023
@nat-n nat-n self-assigned this Mar 4, 2023
nat-n added a commit that referenced this issue Mar 4, 2023
Also improve validation of args
nat-n added a commit that referenced this issue Mar 22, 2023
Also improve validation of args
nat-n added a commit that referenced this issue Mar 22, 2023
@nat-n
Copy link
Owner

nat-n commented Mar 22, 2023

@yahya-abou-imran This was shipped in 0.19.0 🙂

@nat-n nat-n closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants