Skip to content

Commit dce3a3a

Browse files
k1completeJosé Valim
authored andcommitted
set null prompt function in dumbterm mode
Signed-off-by: José Valim <[email protected]>
1 parent 7b20084 commit dce3a3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/iex/lib/iex/cli.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,18 @@ defmodule IEx.CLI do
5353
if tty_works? do
5454
:user_drv.start([:"tty_sl -c -e", tty_args])
5555
else
56-
:user.start
56+
:application.set_env(:stdlib, :shell_prompt_func,
57+
{__MODULE__, :prompt})
58+
:user.start()
5759
unless match? {:win32, _}, :os.type do
5860
IO.puts "Warning: could not run smart terminal, falling back to dumb one"
5961
end
6062
local_start()
6163
end
6264
end
65+
def prompt(_n) do
66+
[]
67+
end
6368

6469
# Check if tty works. If it does not, we fall back to the
6570
# simple/dumb terminal. This is starting the linked in

0 commit comments

Comments
 (0)