1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
9
<holder>Ericsson AB, All Rights Reserved</holder>
12
The contents of this file are subject to the Erlang Public License,
13
Version 1.1, (the "License"); you may not use this file except in
14
compliance with the License. You should have received a copy of the
15
Erlang Public License along with this software. If not, it can be
16
retrieved online at http://www.erlang.org/.
18
Software distributed under the License is distributed on an "AS IS"
19
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
the License for the specific language governing rights and limitations
23
The Initial Developer of the Original Code is Ericsson AB.
26
<title>shell_default</title>
27
<prepared>Joe Armstrong</prepared>
28
<responsible>Joe Armstrong</responsible>
30
<approved>Bjarne Däcker</approved>
31
<checked>Joe Armstrong</checked>
32
<date>1996-09-09</date>
34
<file>shell_default.sgml</file>
36
<module>shell_default</module>
37
<modulesummary>Customizing the Erlang Environment</modulesummary>
39
<p>The functions in <c>shell_default</c> are called when no module
40
name is given in a shell command.
42
<p>Consider the following shell dialogue:</p>
44
1 > <input>lists:reverse("abc").</input>
46
2 > <input>c(foo).</input>
48
<p>In command one, the module <c>lists</c> is called. In command
49
two, no module name is specified. The shell searches the modules
50
<c>user_default</c> followed by <c>shell_default</c> for the
51
function <c>foo/1</c>.
53
<p><c>shell_default</c> is intended for "system wide"
54
customizations to the shell. <c>user_default</c> is intended for
55
"local" or individual user customizations.</p>
60
<p>To add your own commands to the shell, create a module called
61
<c>user_default</c> and add the commands you want. Then add the
62
following line as the <em>first</em> line in your <c>.erlang</c> file in your
65
code:load_abs("$PATH/user_default"). </pre>
66
<p><c>$PATH</c> is the directory where your
67
<c>user_default</c> module can be found.</p>