You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
minElements currently defaults to one, so if you have a collection argument it requires at least a single value, and the only way to change this is to specify minElements=0.
thinking that by assigning a default value to thingies I won't require any values on the command line.
I'd suggest that we make the following changes:
Change the default value for minElements to a symbolic value, I'm going to use -1 for the examples.
Change default behaviour so that if minElements == -1 and there is no default value supplied for an argument, interpret it as minElements == 1
If there is a default value supplied (even if that default value is an empty collection) interpret minElements == -1 as minElements == 0.
I think this is more in keeping with the behaviour for non-collection args that are required unless there is a default value, and keeps backwards compatibility.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
minElements
currently defaults to one, so if you have a collection argument it requires at least a single value, and the only way to change this is to specifyminElements=0
.I constantly do this and get tripped up:
thinking that by assigning a default value to
thingies
I won't require any values on the command line.I'd suggest that we make the following changes:
minElements
to a symbolic value, I'm going to use-1
for the examples.minElements == -1
and there is no default value supplied for an argument, interpret it asminElements == 1
minElements == -1
asminElements == 0
.I think this is more in keeping with the behaviour for non-collection args that are required unless there is a default value, and keeps backwards compatibility.
The text was updated successfully, but these errors were encountered: