~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/stdlib/doc/src/shell_default.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>1996</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
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/.
 
17
 
 
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
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>shell_default</title>
 
27
    <prepared>Joe Armstrong</prepared>
 
28
    <responsible>Joe Armstrong</responsible>
 
29
    <docno></docno>
 
30
    <approved>Bjarne D&auml;cker</approved>
 
31
    <checked>Joe Armstrong</checked>
 
32
    <date>1996-09-09</date>
 
33
    <rev>A</rev>
 
34
    <file>shell_default.sgml</file>
 
35
  </header>
 
36
  <module>shell_default</module>
 
37
  <modulesummary>Customizing the Erlang Environment</modulesummary>
 
38
  <description>
 
39
    <p>The functions in <c>shell_default</c> are called when no module
 
40
      name is given in a shell command.
 
41
      </p>
 
42
    <p>Consider the following shell dialogue:</p>
 
43
    <pre>
 
44
1 > <input>lists:reverse("abc").</input>
 
45
"cba"
 
46
2 > <input>c(foo).</input>
 
47
{ok, foo}    </pre>
 
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>.
 
52
      </p>
 
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>
 
56
  </description>
 
57
 
 
58
  <section>
 
59
    <title>Hint</title>
 
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
 
63
      home directory. </p>
 
64
    <pre>
 
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>
 
68
  </section>
 
69
</erlref>
 
70