When I start an iex shell in my current project with iex -S mix
, I often have to alias my models and load my ex_machina
factory module like:
iex(1)> alias MyProject.{User, Account}
iex(2)> import MyProject.Factory
How can I automate this so that when iex -S mix
starts in dev mode, the alias command (or imports) is run automatically so that I wont have to type it in everytime.
My apologies if this is something very basic and common knowledge.