Erlang parameters (CLI switch '--erl') are used with possible quotes around the argument removed ('%~1').
This causes an error if one arbitrary argument to elixir.bat represents a quoted path with spaces in it:
"[part of path after space] was unexpected at this time."
Enclose the complete expression with quotes to work around this (the quotes are not added to the content).
This behavior is not documented in the [Windows XP Command Line Reference for SET](https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/set.mspx)
but there are other places which document the [SET command](https://ss64.com/nt/set.html).
Fix for #6455
* Add usage information to iex.bat
Support command line switch '--help', '-h', '/h' and '/?' to show usage information for iex.bat.
Check argument with '/I' to make the test case insensitive:
This allows showing usage information with '--HELP', '-H' and '/H'.
Use 'setlocal' and 'endlocal' so changes to the environment are local to the batch file
(https://technet.microsoft.com/en-us/library/bb491001.aspx) - so there is no need to un-set __ELIXIR_IEX_FLAGS.
* Use documented syntax 'goto label' - without leading colon before the label
* Support cli switch '/?' to show help
Use label :end to jump to the end of the batch file after showing help text -
so the call to elixir.bat is not executed when showing help.
Use 'setlocal' and 'endlocal' so that the env var 'argc' is local to this batch file.
* Support cli switch '/?' to show help for elixir.bat
Test for cli switch '/?' does not need to be case insensitive.
I added the following command-line arguments to the ./bin/elixir binary:
* `--logger-otp true|false` - to configure the `:handle_otp_reports`
of the `:logger` application
* `--logger-sasl true|false` - to configure the `:handle_sasl_reports`
of the `:logger` application
Apparently, when shifting parameters, the %~dp0 is not preserved,
so it needs to keep this value. This will fix things like iex on Windows, which just crashed with the previous version.
The batch file now allows both erlang and elixir commands before the ".ex" file; if any unknown parameter is passed before the ".ex file", an error is thrown.