@@ -19,7 +19,8 @@ defmodule IEx.CLI do
1919 else
2020 :user . start
2121 IO . puts "Warning: could not run smart terminal, falling back to dumb one"
22- IEx . start ( [ ] , fn -> :elixir . start_cli end )
22+ config = [ dot_iex_path: find_dot_iex ( :init . get_plain_arguments ) ]
23+ IEx . start ( config , fn -> :elixir . start_cli end )
2324 end
2425 end
2526
@@ -37,12 +38,15 @@ defmodule IEx.CLI do
3738 end
3839
3940 defp tty do
41+ plain_args = :init . get_plain_arguments
42+
43+ config = [ dot_iex_path: find_dot_iex ( plain_args ) ]
4044 function = fn ->
41- IEx . start ( [ ] , fn -> :elixir . start_cli end )
45+ IEx . start ( config , fn -> :elixir . start_cli end )
4246 end
4347
4448 args =
45- if remote = get_remsh ( :init . get_plain_arguments ) do
49+ if remote = get_remsh ( plain_args ) do
4650 unless is_alive do
4751 function = fn ->
4852 IO . puts ( :stderr , "In order to use --remsh, you need to name the current node using --name or --sname. Aborting..." )
@@ -60,6 +64,10 @@ defmodule IEx.CLI do
6064 :user_drv . start ( [ :"tty_sl -c -e" , args ] )
6165 end
6266
67+ defp find_dot_iex ( [ '--dot-iex' , h | _ ] ) , do: :unicode . characters_to_binary ( h )
68+ defp find_dot_iex ( [ _ | t ] ) , do: find_dot_iex ( t )
69+ defp find_dot_iex ( [ ] ) , do: nil
70+
6371 defp get_remsh ( [ '--remsh' , h | _ ] ) , do: list_to_atom ( h )
6472 defp get_remsh ( [ _ | t ] ) , do: get_remsh ( t )
6573 defp get_remsh ( [ ] ) , do: nil
0 commit comments