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

early stop args #60

Closed
jmbarbone opened this issue May 4, 2023 · 0 comments · Fixed by #64
Closed

early stop args #60

jmbarbone opened this issue May 4, 2023 · 0 comments · Fixed by #64
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jmbarbone
Copy link
Owner

Include parameters that stop the parsing of additional further arguments.

# use default values
ca <- command_args(c("--bar", 2))
ca$add_argument("--bar", default = 1)
ca$add_argument("--foo", action = "flag", stop = "soft") # or TRUE
ca$parse()
#> $bar
#> [1] 1
#> $foo
#> [1] TRUE

# strip out other values
ca <- command_args(c("--bar", 2))
ca$add_argument("--bar", default = 1)
ca$add_argument("--foo", action = "flag", stop = "hard")
ca$parse()
#> $foo
#> [1] TRUE
@jmbarbone jmbarbone added the enhancement New feature or request label May 4, 2023
@jmbarbone jmbarbone added this to the CRAN v0.2.0 milestone May 4, 2023
@jmbarbone jmbarbone self-assigned this May 4, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 2023
@jmbarbone jmbarbone mentioned this issue May 8, 2023
jmbarbone added a commit that referenced this issue May 8, 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