LibreCat / Catmandu

Catmandu - a data processing toolkit
https://librecat.org
177 stars 31 forks source link

repeat arguments for command convert #86

Closed nicolasfranck closed 10 years ago

nicolasfranck commented 10 years ago

When an argument is repeated, the command convert takes the last value used:

catmandu convert --inc .  --inc .. Foo to JSON

so "--inc" is only "..".

But the command cannot just derive from the command line options that an array is intended. (if one value is given, should it be a string, or an array with one value?)

So do we need some inspection on Catmandu level? Say for example: every importer declares for each argument if it is an array, hashref or string.

nics commented 10 years ago

i think all array arguments that can be passed through the command now also allow a comma separated list, e.g --inc /path1,/path2. not an ideal solution but it works