This commit adds 6 new options to elixir CLI to aid releases:
* `--pipe-to PIPEDIR LOGDIR` - invokes run_erl with daemon pipe and logs (only on Unix-like systems)
* `--rpc-eval NODE COMMAND` - evaluates the given expression on the given node
* `--boot FILE`, `--boot-var VAR VALUE`, `--erl-config FILE` and `--vm-args FILE` - which are equivalent to Erlang's `-boot`, `-boot_var`, `-config` and `-args_file`
We have also rewritten the CLI to only pass Elixir options to Kernel.CLI.
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
Prior to this patch, both oldshell and IEx would start,
which would make them compete for the standard io. This
could be deterministically triggered by pasting input
with multiple lines on the terminal.
This commit guarantees the oldshell is no longer started.
* Use present continuous in elixirc bin files
* Align descriptions of options in elixirc bin files
* Leave 30 chars to the left
* Options start with 2 white-spaces
* Align descriptions of options in iex bin files
* Options start with 2 white-spaces
* Document --help option in iex command and include long version of --version
* 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
It includes Erlang, Elixir, ExUnit, ExDoc, Logger, IEx, elixirc
It leaves Mix for a different PR.
Command to spot these words:
ag -s '(?<!(\`))(?<!(\.))(?<!(/))(?<!(:))(?<!(_))(erlang|elixir|eex|iex|ex_unit|ex_doc|logger|elixirc)(?!(:))(?!(\?))(?!(_))(?!(-))(?!(\.))(?!(\`))(?!(/))(?!(>))' \
--ignore "*.erl" --ignore "*.yrl" --ignore "*.src"