You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc<-"My ProgramUsage: progname [options] doit --reqarg <arg1>Options: --opt1 <val>"
The reference implementation supports leading options, as described in the above docopt doc.
The R implementation errs:
docopt::docopt(doc, c("doit", "--reqarg", "arg1val"), strict=TRUE) ## errs, but shouldn't
Moving [options] to the end fixes this, but there are lots of good use cases where users are encouraged to specify 'global' options prior to the subcommands (e.g. optional args like, --env prod).