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

docopt.R mixes options and arguments #46

Open
antonkulaga opened this issue Mar 30, 2021 · 0 comments
Open

docopt.R mixes options and arguments #46

antonkulaga opened this issue Mar 30, 2021 · 0 comments

Comments

@antonkulaga
Copy link

antonkulaga commented Mar 30, 2021

I have the following program:

doc <- 'Usage:
  translate.R [--wd <wd>][--suffix <suffix>] <dbs> ...

  Options:   
   -w --wd <wd> [default: FALSE]
   -s --suffix <suffix> [default: translated].
   -h --help     Show this screen.'

when I call:

    args <- c('_with_translation''/data/samples/AIRR-Seq/ramos/test/merged/heavy.tsv''/data/samples/AIRR-Seq/ramos/test/merged/light.tsv'
docopt(doc, args = args, version="0.1")
)

sometimes it works, sometimes "_with_translation" becomes part of dbs. However, when I want to popular --wd argument all the order is messed up and TRUE goes to suffix while '_with_translation' becomes part of

    args <- c(TRUE, '_with_translation''/data/samples/AIRR-Seq/ramos/test/merged/heavy.tsv''/data/samples/AIRR-Seq/ramos/test/merged/light.tsv'
docopt(doc, args = args, version="0.1")

It would be nice if you would fix this bug and also provide a clear way (or clear explanations in the docs) how I can pass options in docopt together with multiple arguments in a safe and reliable way.

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