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 default values for positional arguments #52

Closed
jmbarbone opened this issue Mar 20, 2023 · 0 comments · Fixed by #53
Closed

allow default values for positional arguments #52

jmbarbone opened this issue Mar 20, 2023 · 0 comments · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@jmbarbone
Copy link
Owner

library(scribe)
ca <- command_args()
ca$add_argument("foo", default = "bar")
ca$parse()
#> $foo
#> [1] NA
ca$set_input("foo")
ca$parse()
#> $foo
#> [1] "foo"

Created on 2023-03-20 with reprex v2.0.2

@jmbarbone jmbarbone added the bug Something isn't working label Mar 20, 2023
@jmbarbone jmbarbone self-assigned this Mar 20, 2023
jmbarbone added a commit that referenced this issue Apr 3, 2023
jmbarbone added a commit that referenced this issue Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant