[erlang-questions] compile several modules from shell

Thomas Lindgren <>
Tue Dec 1 14:35:49 CET 2009





----- Original Message ----
> From: Joe Armstrong <>
> To: Roberto Ostinelli <>
> Cc: Erlang <>
> Sent: Tue, December 1, 2009 2:23:45 PM
> Subject: Re: [erlang-questions] compile several modules from shell
> 
> What you are really asking is "how can I change the default commands
> in the shell?"
> 
> This is what the module user_default.erl is for.
> 
> If you define a module called user_default compile it and put it in
> your erlang path
> then the commands in user default will be added to your shell and can
> be called without giving
> the prefix "user_default"
...


People have provided quite a few nice hacks in user_default over the years. Here is a fairly straightforward one you can cannibalize:
  http://github.com/thomasl/erlang-repl-utils/blob/master/user_default.erl

I love using l/0 and nl/0, for instance.

Best,
Thomas



      


More information about the erlang-questions mailing list