elixir-lang/elixir — pull request #2448 by chyndman (2014-06-24 02:48:39+00:00)
Title: Move lib paths into ERL_LIBS environment variable

This proposes a less cumbersome way of adding Elixir's `/lib/*/ebin` directories to the code path. We simply prepend the shared root `/lib` to `ERL_LIBS` temporarily, and [Erlang handles the rest](http://www.erlang.org/doc/man/code.html).

By having the batch file set `ERL_LIBS` for the life of the shell, we both honor previously defined `ERL_LIBS` values and avoid quote headaches that arise through using the `-env` parameter.

Having said that, using `-env` rather than `-pa` enables simpler creation of shortcuts (which is a primary motivation for this PR.) A shortcut for IEx can now look like:
```
werl.exe -env ERL_LIBS "Path\To\elixir\lib" -s elixir start_cli -user Elixir.IEx.CLI -extra --no-halt
```
In particular, `Path\To\elixir` is an easy substitution for installation and doesn't require wildcards.