There is some uncertainty as to wether it will be possible
to start an IEx shell dynamically from a -noshell environment.
Therefore, this PR simplifies the shell booting to still
rely on -user, as it did earlier than Erlang/OTP 26.
Fixes#12677.
Using printf here prevents an error when outputting the filtered flag
`-e` as doing with with `echo "-e"` doesn't output anything
(deleting the option we wanted to filter).
More info: https://unix.stackexchange.com/a/65819
This gives us more control to cache paths
and over boot compared to relying on scripts.
This also makes it easier for someone to provide
alternatives to IEx.
This fixes#1234 where previous escaping pattern accidentally
used invalid character range in the regexp.
By using `@` as delimiter and pushing the `-` to the end of the
bracket we avoid both problems.
Before this fix, colors are disabled in my shell, and NO_COLOR variable is unset.
Fixes a bug introduced in 229efec200 (#9550)
where the variable is checked to be set, when it should be the opposite.
This is an implementation of [`NO_COLOR`][1] initiative that proposes
single environment variable to prevent using colours in terminal.
[1]: https://no-color.org
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.