1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
<TITLE>shell_default</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
<STYLE TYPE="text/css">
<!--
.REFBODY { margin-left: 13mm }
.REFTYPES { margin-left: 8mm }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
<IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>shell_default</H1>
</CENTER>
<H3>MODULE</H3>
<DIV CLASS=REFBODY>
shell_default
</DIV>
<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
Customizing the Erlang Environment
</DIV>
<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>
<P>The functions in <CODE>shell_default</CODE> are called when no module
name is given in a shell command.
<P>Consider the following shell dialogue:
<PRE>
1 > <STRONG>lists:reverse("abc").</STRONG>
"cba"
2 > <STRONG>c(foo).</STRONG>
{ok, foo}
</PRE>
<P>In command one, the module <CODE>lists</CODE> is called. In command
two, no module name is specified. The shell searches the modules
<CODE>user_default</CODE> followed by <CODE>shell_default</CODE> for the
function <CODE>foo/1</CODE>.
<P><CODE>shell_default</CODE> is intended for "system wide"
customizations to the shell. <CODE>user_default</CODE> is intended for
"local" or individual user customizations.
</DIV>
<H3>Hint</H3>
<DIV CLASS=REFBODY>
<P>To add your own commands to the shell, create a module called
<CODE>user_default</CODE> and add the commands you want. Then add the
following line as the <STRONG>first</STRONG> line in your <CODE>.erlang</CODE> file in your
home directory.
<PRE>
code:load_abs("$PATH/user_default").
</PRE>
<P><CODE>$PATH</CODE> is the directory where your
<CODE>user_default</CODE> module can be found.
</DIV>
<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
Joe Armstrong - support@erlang.ericsson.se<BR>
Robert Virding - support@erlang.ericsson.se<BR>
</DIV>
<CENTER>
<HR>
<SMALL>stdlib 1.14.2<BR>
Copyright © 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|