fsharp/FAKE — pull request #455 by bentayloruk (2014-06-03 22:30:39+00:00)
Title: New (backwards compat) CLI for FAKE that includes FSI cmd args passing

While working on #438, I realised that the feature would make the existing FAKE command line brittle. The existing code looks for argument strings regardless of their position or relation to switches. Adding support for passing *arbitrary* string args to FSI, could easily break this. Therefore, I have added the support I needed for #438 and created a new CLI for FAKE that I think will be much easier to understand and extend in the future. I hope you agree. If not, I would be happy to discuss and fix an concerns.

This PR makes FAKE.exe dependant on the [UnionArgParser library](https://github.com/nessos/UnionArgParser). If figured this would be ok as FAKE includes other assemblies and this one is fairly small and focused. Using it to [specify the FAKE CLI args](https://github.com/bentayloruk/FAKE/blob/6f287a2a38ae6bac79641f776a4784b71f757c4b/src/app/FAKE/Cli.fs) is really clean.

An example usage now looks like this:

`fake.exe --script build.fsx --target clean --envvar key1 val1 --envar key2 val2`

We also support the short switches:

`fake.exe -s build.fsx -t --ev key1 val1 --ev key2 val2`

`fake --help` now looks like this:
![cli](https://cloud.githubusercontent.com/assets/189409/3167418/bf6d5f8a-eb6d-11e3-9994-c06c967fed2a.png)

I don't think too much is outstanding, although I appreciate it is important that this is tested well, do we don't break old scripts. If the new CLI args don't parse, we fall back to exactly the same code as before the new CLI, so I hope this provides the safest experience.

TODO:
* Improve the switch documentation strings (I don't know much about Boot for example).
* There is some FSI arg crossover with Vasily's work on #453. I have merged this, but I think it could be cleaned up/generalised a little more.

Look forward to feedback!