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
Add IEnumerable<T> support for arguments #728
Comments
Proper tokenizer time 😄? Would also be great to see switches (true, false) be an option |
Hi, I'm about to spend some time on this feature but I don't want to go with implementing it without a couple of question: 1) The format. Instead of this:
Why not this:
In my opinion it's much more readable, with lot less keystrokes and I guess this is the usual pattern for multiple command line arguments as well. 2) The options parser/tokenizer. Have you guys ever considerer using commandline library to do the heavy job of parsing command line arguments? It's very concise and clean API, fully supported by the community since 2005. I've used it myself several times before for internal company tools and it works very well. With a custom parser we're inventing the wheel here with such an easy-to-plugin API next door. Haven't look into detail but it seems that plugging it in would be as easy as apply the Options attribute to CakeOptions. It supports several data type mappings, including Arrays and Lists. Oh, and switches :) Cheers! |
Hello @joaope, Great that you're thinking about contributing to Cake.
Best regards |
@patriksvensson Hi :) thanks from the quick reply.
Counting that you want to go with the verbose option and being arguments handled as an
|
I also thought that commandline was a good option if Cake was to improve it's command-line support. It's a bit confusing and inconsistent having different parameter passing done by PowerShell / Bash (in the bootstrapper) and then by Cake. It would be better if Cake did everything and the bootstrapper did nothing but bootstrap. |
Any update on this one? |
@patriksvensson any update regarding this feature? I have projects which I need that projects. Feature needs to support object |
@markofranjic Support for IEnumerable arguments will be available once #2334 have been merged into the codebase. |
Resolved in 1.0 |
Would be nice if we supported passing multiple arguments to the Cake.exe.
And allowed the user to resolve them all by resolving an IEnumerable like this:
Of course there would have to be safe guards in place to ensure that we throw if the user try to resolve a single argument where multiple has been passed and vice versa.
(Originally reported at http://stackoverflow.com/questions/35727010/how-do-i-pass-an-argument-that-is-a-string-array-to-my-cake-script)
The text was updated successfully, but these errors were encountered: