diff options
author | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
commit | 84adefa331c4159d432d22840663c38f155cd4c1 (patch) | |
tree | bff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/stdlib/doc/src/shell_default.xml | |
download | otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2 otp-84adefa331c4159d432d22840663c38f155cd4c1.zip |
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/stdlib/doc/src/shell_default.xml')
-rw-r--r-- | lib/stdlib/doc/src/shell_default.xml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/shell_default.xml b/lib/stdlib/doc/src/shell_default.xml new file mode 100644 index 0000000000..4f8cc6c5bb --- /dev/null +++ b/lib/stdlib/doc/src/shell_default.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="latin1" ?> +<!DOCTYPE erlref SYSTEM "erlref.dtd"> + +<erlref> + <header> + <copyright> + <year>1996</year> + <year>2007</year> + <holder>Ericsson AB, All Rights Reserved</holder> + </copyright> + <legalnotice> + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + The Initial Developer of the Original Code is Ericsson AB. + </legalnotice> + + <title>shell_default</title> + <prepared>Joe Armstrong</prepared> + <responsible>Joe Armstrong</responsible> + <docno></docno> + <approved>Bjarne Däcker</approved> + <checked>Joe Armstrong</checked> + <date>1996-09-09</date> + <rev>A</rev> + <file>shell_default.sgml</file> + </header> + <module>shell_default</module> + <modulesummary>Customizing the Erlang Environment</modulesummary> + <description> + <p>The functions in <c>shell_default</c> are called when no module + name is given in a shell command. + </p> + <p>Consider the following shell dialogue:</p> + <pre> +1 > <input>lists:reverse("abc").</input> +"cba" +2 > <input>c(foo).</input> +{ok, foo} </pre> + <p>In command one, the module <c>lists</c> is called. In command + two, no module name is specified. The shell searches the modules + <c>user_default</c> followed by <c>shell_default</c> for the + function <c>foo/1</c>. + </p> + <p><c>shell_default</c> is intended for "system wide" + customizations to the shell. <c>user_default</c> is intended for + "local" or individual user customizations.</p> + </description> + + <section> + <title>Hint</title> + <p>To add your own commands to the shell, create a module called + <c>user_default</c> and add the commands you want. Then add the + following line as the <em>first</em> line in your <c>.erlang</c> file in your + home directory. </p> + <pre> +code:load_abs("$PATH/user_default"). </pre> + <p><c>$PATH</c> is the directory where your + <c>user_default</c> module can be found.</p> + </section> +</erlref> + |