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

Add a method to register the help flag #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Dec 15, 2021

  1. Add helpflag() to Options

    When we add a flag with `reqopt()`, the mandatory flag is always
    required. This behavior doesn't work well when we want to add a `help`
    flag, which should work without the required flag is not specified like
    `my_command --help`.
    
    So, let's add `helpflag()` method, which add an optional flag "help"
    which will allow `parse()` to skip checking the existence of mandatory
    flags.
    keiichiw committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    39e91de View commit details
    Browse the repository at this point in the history
  2. Don't use "help" as sample data unrelated to helpflag()

    Since `helpflag()` method was added, we shouldn't use "help" as a
    placeholder in tests unrelated to the helpflag() method.
    keiichiw committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    44a2da3 View commit details
    Browse the repository at this point in the history