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 example field to scribeCommandArgs #38

Closed
jmbarbone opened this issue Mar 2, 2023 · 0 comments · Fixed by #39
Closed

add example field to scribeCommandArgs #38

jmbarbone opened this issue Mar 2, 2023 · 0 comments · Fixed by #39

Comments

@jmbarbone
Copy link
Owner

Should be able ot include examples and append to description

library(scribe)
ca <- command_args()
ca$add_argument("foo")
ca$add_description("stuff here")
# add examples one-by-one; parameters for appending `"$ "` or `"> "` or `""`
# multiple examples should have an option for aligning?
ca$add_example("commamd value", "single value")
ca$add_example("command value value", "two values")
ca$help()
#> {scribe} command_args
#> 
#> file : {path}
#> 
#> DESCRIPTION
#>   stuff here
#> 
#> USAGE
#>   {command} [--help | --version]
#>   {command} [--help] [--version] [foo [ARG]] 
#> 
#> ARGUMENTS
#>   --help    : prints this and quietly exits                   
#>   --version : prints the version of {scribe} and quietly exits
#>   foo [ARG] : help information for foo  
#> 
#> EXAMPLES
#>   $ command value       # single value
#>   $ command value value # two values
jmbarbone added a commit that referenced this issue Mar 4, 2023
jmbarbone added a commit that referenced this issue Mar 4, 2023
jmbarbone added a commit that referenced this issue Mar 4, 2023
@jmbarbone jmbarbone mentioned this issue Mar 4, 2023
jmbarbone added a commit that referenced this issue Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant