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

[Feature] Show help when args are empty #11

Closed
xcodebuild opened this issue May 20, 2020 · 1 comment · Fixed by #12
Closed

[Feature] Show help when args are empty #11

xcodebuild opened this issue May 20, 2020 · 1 comment · Fixed by #12
Labels
good first issue Good for newcomers

Comments

@xcodebuild
Copy link

Run without args:

error: The following required arguments were not provided:
    <CHAR>

USAGE:
    fontfor-macOS [FLAGS] <CHAR>

For more information try --help

Run with --help

fontfor 0.3.0
7sDream <i@7sdre.am>
find fonts which can show a specified character and preview them in terminal or browser

USAGE:
    fontfor-macOS [FLAGS] <CHAR>

FLAGS:
    -h, --help       Prints help information
    -p, --preview    Preview character use supported fonts in browser
    -t, --tui        Enable Terminal UI mode enable this mode will disable the --preview/-p and ignore --verbose/-v arg
    -V, --version    Prints version information
    -v, --verbose    Verbose mode, show all font styles

ARGS:
    <CHAR>    The character

Just show help when args are empty could be better

@7sDream
Copy link
Owner

7sDream commented May 20, 2020

This seems can be done easily by using clap's ArgRequiredElseHelp argument.

Would you like to send a PR to do this?

@7sDream 7sDream added the good first issue Good for newcomers label May 20, 2020
7sDream added a commit that referenced this issue May 21, 2020
7sDream added a commit that referenced this issue May 22, 2020
- Display help message directly when `char` arg are missing (Issue #11, Pr #12)
7sDream added a commit that referenced this issue May 22, 2020
- Display help message directly when `char` arg are missing (Issue #11, Pr #12)
7sDream added a commit that referenced this issue May 22, 2020
- Display help message directly when `char` arg are missing (Issue #11, Pr #12)
7sDream added a commit that referenced this issue May 22, 2020
- Display help message directly when `char` arg are missing (Issue #11, Pr #12)
7sDream added a commit that referenced this issue May 22, 2020
- Display help message directly when `char` arg are missing (Issue #11, Pr #12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants