File: shell_default.html

package info (click to toggle)
erlang-doc-html 1%3A8.0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 18,028 kB
  • ctags: 7,419
  • sloc: perl: 1,841; ansic: 323; erlang: 155
file content (60 lines) | stat: -rw-r--r-- 1,830 bytes parent folder | download
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
<HTML>
<HEAD>
<!-- refpage -->
<TITLE>shell_default</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>


<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Erlang Systems]" SRC="min_head.gif"></A>
<H1>shell_default</H1>
</CENTER>
<H3>MODULE</H3>
<UL>
shell_default</UL>
<H3>MODULE SUMMARY</H3>
<UL>
Customizing the Erlang Environment</UL>
<H3>DESCRIPTION</H3>
<UL>
<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 &#62; <STRONG>lists:reverse(&#34;abc&#34;).</STRONG>
&#34;cba&#34;
2 &#62; <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 &#34;system wide&#34;
customizations to the shell. <CODE>user-default</CODE> is intended for
&#34;local&#34; or individual user customizations.
</UL>
<H3>Hint</H3>
<UL>
<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(&#34;$PATH/user_default&#34;).</PRE>
<P><CODE>$PATH</CODE> is the directory where your
<CODE>user_default</CODE> module can be found.
</UL>
<H3>AUTHORS</H3>
<UL>
Joe Armstrong - support@erlang.ericsson.se<BR>
Robert Virding - support@erlang.ericsson.se<BR>
</UL>
<CENTER>
<HR>
<FONT SIZE=-1>stdlib 1.10<BR>
Copyright &copy; 1991-2001
<A HREF="http://www.erlang.se">Ericsson Utvecklings AB</A><BR>
<!--#include virtual="/ssi/otp_footer.html"-->
</FONT>
</CENTER>
</BODY>
</HTML>