csharp: support command line arguments for scripts
authorAaron Bockover <abock@xamarin.com>
Wed, 22 Mar 2017 14:30:36 +0000 (10:30 -0400)
committerMarek Safar <marek.safar@gmail.com>
Thu, 23 Mar 2017 09:18:10 +0000 (10:18 +0100)
commit87bb2f581459a1118be7c049981d111b45fd7a8a
treec71f5806e38ecdf73108399a2b510aa4372397c3
parent4ab98d81cde3d2606051b7190194889d1f13e7b8
csharp: support command line arguments for scripts

This adds a command line argument preprocessor that splits command line
arguments into two groups, delimited by the "standard" `--` "stop
processing" argument, or by the `-s` argument which can be used with
Unix shebang syntax (where the path of the file being executed will
be appended to the command line specified on the shebang line).

- anything before `--` or `-s` will be passed to mcs/csharp as usual
- anything after `--` or `-s` will _not_ be processed by mcs/csharp,
  and will be made available in an `Args` builtin, like `csi`

This _finally_ (after almost 10 years) allows `csharp` to be used for
proper script authoring!

Document the new arguments in the man page. Also remove references to
'gsharp' from the man page.
man/csharp.1
mcs/tools/csharp/repl.cs