trevorld / r-argparse

command-line optional and positional argument parser
https://trevorldavis.com/R/argparse/
GNU General Public License v2.0
104 stars 11 forks source link

Allow passing tuple to metavar #12

Closed trevorld closed 8 years ago

trevorld commented 8 years ago

Request from Paul Newell to allow

parser$add_argument("extent", nargs = 4, type = "double", metavar = c("e1", "e2", "e3", "e4"))

and/or

parser$add_argument("extent", nargs = 4, type = "double", metavar = list("e1", "e2", "e3", "e4"))

to give usage

usage: ./test.R [-h] e1 e2 e3 e4