Can I save an iex command alias in .iex.exs file?

101 views Asked by At

In iex, I'd like to break out of a block using #iex:break, but I find that annoying to type. Can it be aliased? Preferably, I'd be able to save this in my user's .iex.exs file for future use.

1

There are 1 answers

0
Aleksei Matiushkin On BEST ANSWER

As can be seen in the source code, #iex:break is hardcoded in IEx.Evaluator and therefore cannot be neither substituted nor aliased.

That is probably because the shorter breaker would have many false positives in the code.

The only possibility would be to patch IEx.Evaluator code and compile yourself.