btw doesn't have to be arguments specifically. Can be options as well,
similar to the git style: git -c name1=value1 -c name2=value2 etc.

На вт, 8.06.2021 г. в 19:42 ч. Васил Зорев <[email protected]>
написа:

> Hello,
>
> I am looking into the possibility of a Karaf command which can take a
> bigger number of arguments (probably 10 or more).
>
> The closest use case I can give is a map of key-value pairs (or
> properties?). Something like ID1=val1, ID2=val2 etc. where each ID is a
> String value. The main argument for a map (vs List) is that the IDs
> represent different entity types, so I cannot treat them the same way.
>
> I saw in org.apache.karaf.shell.support.converter.DefaultConverter there
> is a possibility to convert maps. However in
> the org.apache.karaf.shell.api.action.Argument
> and org.apache.karaf.shell.api.action.Option API, the multiValued attribute
> says it expects a list.
>
> Can this be done with a org.apache.karaf.shell.api.console.Parser ?
>
> Do you think it is a good idea at all in the context of command-line
> operations or would you recommend another approach ?
>
> Thank you,
> Regards,
> Vassil
>

Reply via email to