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

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.



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aleksei Matiushkin