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

export func explainHelp, or inject apiExplained #12

Open
arkanoid87 opened this issue Mar 5, 2023 · 2 comments
Open

export func explainHelp, or inject apiExplained #12

arkanoid87 opened this issue Mar 5, 2023 · 2 comments
Labels
design API Design enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed invalid This doesn't seem right

Comments

@arkanoid87
Copy link
Contributor

how about exporting func explainHelp or inject the resulting string in getOpt caller scope (just like vars)?
This way devs can quit the program with nice formatted help screen if the parameters are not correct.

I'm currently using this, but it's just a workaround

@["--help"].getOpt (myvar: 42)
@juancarlospaco
Copy link
Owner

I dont really understand what you have in mind. 🤔
Send Pull Request ?.

@juancarlospaco juancarlospaco added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers design API Design labels Mar 7, 2023
@juancarlospaco
Copy link
Owner

Have you seen https://github.com/juancarlospaco/cliche/blob/nim/src/cliche.nim#L63
the helpMessage there you can pass any arbitrary string for Help message.

@juancarlospaco juancarlospaco added the invalid This doesn't seem right label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design API Design enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants