joerdav / xc

Markdown defined task runner.
https://xcfile.dev/
MIT License
1.14k stars 27 forks source link

Change required inputs message #47

Closed DannyBen closed 1 year ago

DannyBen commented 1 year ago

First of all, thank you for this magnificent tool. It always makes me happy to see markdown and code combined together (I implemented a ruby gem that runs tests embedded in markdown :)

One minor suggestion:

When there is a required input that is not entered, the error message is:

Task has required inputs:
        xc hello [NAME] [HEIGHT]
        NAME=[NAME] HEIGHT=[HEIGHT] xc hello

I believe the square brackets are incorrect in this context, as they denote "optional".

Perhaps this?

Task has required inputs:
        xc hello NAME HEIGHT
        NAME=... HEIGHT=... xc hello

or, the below which creates a distinction between an environment variable name (CAPS), and a <placeholder> string:

Task has required inputs:
        xc hello <name> <height>
        NAME=<name> HEIGHT=<height> xc hello

Note that in this case, it is common to have the string between <...> in lowercase.

joerdav commented 1 year ago

@DannyBen thanks for the kind words, and the suggestion! ❤️

I like the second suggestion more. I'm open to contributions if you want to submit a PR. Or I can cover this off when I get around to it!

DannyBen commented 1 year ago

if you want to submit a PR

Since my Go is rusty (no pun intended), I'm gonna have to say: "maybe" :)

joerdav commented 1 year ago

Happy to help if needed, I'll leave you to it but let me know if you give up :)

joerdav commented 1 year ago

Released in v0.0.169