-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array arguments #101
Comments
I like this. I'm wondering if maybe using a comma separated list might be better though?
|
Is there a precedent for that usage? I can't think of one myself—especially one that plays nicely when used in For instance, |
I think it may be more common in the Python world? I haven't looked a whole lot. I'm fine going either way. |
Just to chime in, Python's Click library does it the way @liscio mentioned but they also have an optional guard in the form of |
This seems like a worthwhile addition. I think we'd need a new property wrapper for it. Something like: @Array(name: "input")
var inputs: [String]
|
You could also conform |
This is essentially superseded by #180 |
I've been using Console for building some internal tools, and it's been going great so far. Thanks for separating it from vapor, and for the recent ConsoleKit changes!
Anyway, I was wondering today whether you folks considered allowing for an argument to be specified multiple times? For instance, say I have an
input
argument that can be specified multiple times. It'd be used like so:Ideally, this would allow me to get an array of paths for the key
"input"
from aCommandContext
.Thoughts?
The text was updated successfully, but these errors were encountered: