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

allow NA for action = "flag" #67

Closed
jmbarbone opened this issue Aug 17, 2023 · 0 comments · Fixed by #68
Closed

allow NA for action = "flag" #67

jmbarbone opened this issue Aug 17, 2023 · 0 comments · Fixed by #68
Assignees
Labels
enhancement New feature or request

Comments

@jmbarbone
Copy link
Owner

NA should be accepted as a flag value -- which should represent a flag that is not explicitly stated

ca <- command_args()
ca$add_argument("--foo", action = "flag")
ca$parse()
#> $foo
#> [1] FALSE

ca <- command_args()
ca$add_argument("--foo", action = "flag", default = NA)
ca$parse()
#> $foo
#> [1] NA
@jmbarbone jmbarbone added the enhancement New feature or request label Aug 17, 2023
@jmbarbone jmbarbone self-assigned this Aug 17, 2023
jmbarbone added a commit that referenced this issue Aug 18, 2023
jmbarbone added a commit that referenced this issue Aug 18, 2023
jmbarbone added a commit that referenced this issue Aug 18, 2023
jmbarbone added a commit that referenced this issue Aug 18, 2023
@jmbarbone jmbarbone mentioned this issue Aug 18, 2023
jmbarbone added a commit that referenced this issue Aug 18, 2023
jmbarbone added a commit that referenced this issue Aug 18, 2023
jmbarbone added a commit that referenced this issue Aug 28, 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

Successfully merging a pull request may close this issue.

1 participant