kotlinx-cli
kotlinx-cli copied to clipboard
Fix default value for lists
This condition is wrong, empty list should be permitted to be default value as all other concrete values can be. And in my case it is default value. What's more this condition didn't prevent other collections from having default value of empty collection e. g. Set, Map, Collection.
I am talking about SingleNullableOption, not MultipleOption, where it is clearly stated that it can't have emtpy collection, though I don't know why
It's done by design. MultipleOption when it doesn't set by user stores empty list. Why do you need setting default value as empty list if it's already empty list? If there is nothing provided for this option in command line you get empty list without any defaults.
I am talking about SingleNullableOption
SingleNullableOption stores null value if no value is provided in command line. Other types of collections isn't supported, only lists for several values.