-
Notifications
You must be signed in to change notification settings - Fork 17
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
spaces in --arg stye are not treated as expected #40
Comments
Thanks for the quick feedback! I will look into it today |
Fixed code does this: #!/usr/bin/env Rscript
"style files.
Usage:
style_files [--arg=<arg1>] <files>...
Options:
--arg=<arg1> Package where the style guide is stored [default: Arg1].
" -> doc
# expected behavior
docopt::docopt(doc, c("--arg=tidyverse_style(scope= \"none\")", "R/test.R"))
|
Looks great, will try in {precommit} tonight. Thanks a ton @edwindj. |
I did some experimentation, here's what I found: # works
"--style_transformers=tidyverse_style(scope = \"none\")"
'--style_transformers=tidyverse_style(scope = "none")'
--style_transformers=tidyverse_style(scope = "none")
# does not
'--style_transformers=tidyverse_style(scope = \'none\')'
"--style_transformers=tidyverse_style(scope = 'none')" So there are more options that work than options that don't work. 😄 Even though things could be further improved, I appreciate all the work @edwindj already put into this and we can call it a day form my side. Will just tell people to the right quotes in the right place. |
Unfortunately, #19 does not seem resolved, in fact made things worse for my use case. I caught the command line args with
commandArgs(TRUE)
so I you should be able to reproduce this easily:With the CRAN version
Created on 2020-06-15 by the reprex package (v0.3.0)
With the GitHub version
Created on 2020-06-15 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: