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

Expose/implement options_first #23

Open
crcox opened this issue Aug 19, 2016 · 0 comments
Open

Expose/implement options_first #23

crcox opened this issue Aug 19, 2016 · 0 comments

Comments

@crcox
Copy link

crcox commented Aug 19, 2016

doc <- "Usage: demo1 [options] <x> <y> <z>

Options:
  -h, --help
  -i, --invert
"
str(docopt::docopt(doc,args='1 -2 -3'))

Results in an error because it tries to treat -2 and -3 as options.

doc <- "Usage: demo2 [options] [--] <x> <y> <z>

Options:
  -h, --help
  -i, --invert
"
str(docopt::docopt(doc,args='-- 1 -2 -3'))

Works just fine, but requires that -- be used, even when there are no options provided, which is annoying.

In the python version of docopt, there is an options_first= parameter to docopt. Can this be exposed/implemented in R?

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

No branches or pull requests

1 participant