defining functions in startup file
Wed Nov 14 20:57:01 CET 2001
Yes there is a better way of customizing your environment, quoting the
documentation of shell_default:
To add your own commands to the shell, create a module called user_default
and add the commands you want. Then add the following line as the first
in your .erlang file in your home directory.
org: Eric Conspiracy Secret Laboratories
I'm Happi, you should be happy!
----- Original Message -----
From: "Garry Hodgson" <>
To: "Erlang" <>
Sent: Wednesday, November 14, 2001 8:42 PM
Subject: defining functions in startup file
> i'd like to define some simple functions to use while working in
> the erlang interpreter, like one to edit a module, given its name,
> and things like that.
> at the prompt, i can manually type something like:
> E = fun( Module ) ->
> os:cmd( "fred " ++ atom_to_list( Module ) ++ ".erl" )
> and then use:
> E( foo ).
> to edit "foo.erl". a small convenience.
> but if i put the above in my .erlang file, i can't use it once
> erlang's started. how do i make this work, or is there a better
> mechanism for customizing my environment?
> Garry Hodgson One way or another
> Senior Hacker One way or another
> Software Innovation Services One way or another
> AT&T Labs This darkness got to give...
More information about the erlang-questions