trevorld / r-argparse

command-line optional and positional argument parser
GNU General Public License v2.0
103 stars 11 forks source link

Fix issue #12: allow passing tuple to metavar in `add_argument()` #13

Closed paul-newell closed 7 years ago

paul-newell commented 7 years ago

I have added functionality to pass a tuple to the metavar argument in add_argument(). I have tested this using calls of the form add_argument(..., metavar = c(...)) add_argument(..., metavar = list(...)) Please use the code (or not) as you see fit.

codecov-io commented 7 years ago

Current coverage is 88.18% (diff: 100%)

No coverage report found for master at 84f2d18.

Powered by Codecov. Last update 84f2d18...00e6001

trevorld commented 7 years ago

Thanks for the patch! I modified it so I could use my convert_argument helper function. I also decided not to support passing in a list to metavar but my new unit test for passing a character vector to metavar seems to be passing fine. Probably not going to be in a super hurry to push this through the CRAN gauntlet but all future development versions on github should have this feature as well as future versions on CRAN.