1

When using iex, I sometimes create an incomplete expression by accident. A trivial example:

iex(1) String.reverse("foo"
...(1)

If I supplied the missing ) here, all would be well, but sometimes I don't see what I did wrong.

Is there a way to abandon the current expression - to say, "actually, forget that, just put me back on a working prompt?" Control + C doesn't solve it; my options are to (a)bort and kill the shell entirely, or (c)ontinue and try to figure it out myself.

By contrast, Ruby's irb will just forget the incomplete expression if I press Control + C.

How can I recover from a mistake in the Elixir shell?

Nathan Long
  • 122,748
  • 97
  • 336
  • 451
  • Hmm. I hadn't seen the one that this duplicates. Oh well - I worded this question as many ways as I could to make it searchable, so hopefully other people can use this as a way to find the original. :) – Nathan Long Jul 01 '16 at 13:27

0 Answers0