Can I customize Elixir iex to exit with ctrl-D?
Asked Answered
M

2

11

I know several ways to quit iex but I'd love to use ctrl-D like in other REPLs (e.g., node, irb.)

How can I customize iex to do this?

Miltie answered 20/6, 2016 at 17:55 Comment(0)
M
3

Not possible AKAIK, but one can use ctrl-\ to exit Iex and Erl.

Miltie answered 10/5, 2017 at 17:35 Comment(0)
L
12

As far as I know, this is not possible right now. IEx operations support comes directly from the Erlang shell, and this is not implemented in Erlang.

Most probably it won't be ever implemented either - this change was already proposed and rejected: https://github.com/erlang/otp/pull/983

Louque answered 21/6, 2016 at 6:57 Comment(1)
thanks for the link! I don't (yet) follow the reasoning behind the "no ctrl-D" decision but it's good to know that it's intentional. Customizing iex to exit on ctrl-D may not be wise but I'm still curious if it's possible.Miltie
M
3

Not possible AKAIK, but one can use ctrl-\ to exit Iex and Erl.

Miltie answered 10/5, 2017 at 17:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.