Hi,
Currently the common way to exit iex is C-c C-c (Ctrl + c Ctrl + c). erl on the
otherhand supports the q() helper, short for
init:stop():
Erlang/OTP 28 [erts-16.0.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]
Eshell V16.0.2 (press Ctrl+G to abort, type help(). for help)
1> q().
ok
2> %
It would be great if we could introduce the same helper to iex.
– bp
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-lang-core/CAMEXYWerue9T_inV-fmmxx4Kpi%3Dj-pFAC9yXujbu3SS7HXaNfA%40mail.gmail.com.
You’re right. I completely forgot about the case of connecting to a remote node.
I’m guessing the reason neither iex or erl doesn’t support just gracefully exiting the repl without killing any other processes because tty doesn’t support it? Then how does this work with Ctrl+C?
Additionally, Ctrl+D is typically the shortcut used to exit any shell (since it denotes EOF), not Ctrl+C. Most shells that support this probably inherited it from building on top of GNU readline or similar. I guess supporting this means patching edlin?
Nevertheless, I think it’s a small, but important, quality of life improvement to support a quit/exit function and Ctrl+D our shell, since it doesn’t break the muscle memory of people coming from (or constantly switching back and fro) other languages. It’s a standard that everything from mainstream repls like python, irb and node, to more academic languages like Haskell and Coq and even lisps (which have heavy remote repl usage) like clojure, common lisp and scheme adhere to.
Maybe it’s worth revisiting this after the necessary changes are made upstream?
– bp
![]() | |
On Jan 16, 2026, at 12:35, Benjamin Philip <benjamin....@gmail.com> wrote:
To view this discussion visit https://groups.google.com/d/msgid/elixir-lang-core/CAMEXYWcQ7_c5mfgdAouYadj2j8jtUf6Ep%2BYoL%2BWpAkWe9S1c1w%40mail.gmail.com.