docopt / docopt.R

Command-line interface description language for R (http://docopt.org)
Other
210 stars 17 forks source link

deal gracefully with given args #14

Closed shabbychef closed 8 years ago

shabbychef commented 8 years ago

docopt does not deal correctly with the case of a given args argument when it is called by r ('little r'). This patch moves the detection of command-line args into the missing check block, so that code like

opt <- docopt(doc,args='--verbose --just-testing --etc')

works whether or not the code is ultimately called by R or r.

edwindj commented 8 years ago

Thanks for the fix!