~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<erlref>
5
5
  <header>
6
6
    <copyright>
7
 
      <year>1996</year><year>2009</year>
 
7
      <year>1996</year><year>2010</year>
8
8
      <holder>Ericsson AB. All Rights Reserved.</holder>
9
9
    </copyright>
10
10
    <legalnotice>
13
13
      compliance with the License. You should have received a copy of the
14
14
      Erlang Public License along with this software. If not, it can be
15
15
      retrieved online at http://www.erlang.org/.
16
 
    
 
16
 
17
17
      Software distributed under the License is distributed on an "AS IS"
18
18
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
19
      the License for the specific language governing rights and limitations
20
20
      under the License.
21
 
    
 
21
 
22
22
    </legalnotice>
23
23
 
24
24
    <title>shell</title>
333
333
&lt;0.57.0>
334
334
27> <input>get(aa).</input>
335
335
hello
336
 
28> <input>io:format("hello hello\ ").</input>
337
 
hello hello ok
 
336
28> <input>io:format("hello hello\n").</input>
 
337
hello hello
 
338
ok
338
339
29> <input>e(28).</input>
339
 
hello hello ok
 
340
hello hello
 
341
ok
340
342
30> <input>v(28).</input>
341
343
ok
342
344
31> <input>c(ex).</input>
737
739
       returns <c>{error,Reason}</c>.</item>
738
740
    </list>
739
741
  </section>
 
742
 
 
743
  <section>
 
744
    <title>Prompting</title>
 
745
    <p>The default shell prompt function displays the name of the node
 
746
      (if the node can be part of a distributed system) and the
 
747
      current command number. The user can customize the prompt
 
748
      function by calling
 
749
      <c>shell:prompt_func/1</c> or by setting the application
 
750
      configuration parameter <c>shell_prompt_func</c> for the
 
751
      application STDLIB.</p>
 
752
    <p>A customized prompt function is stated as a tuple
 
753
      <c>{Mod,&nbsp;Func}</c>. The function is called as
 
754
      <c>Mod:Func(L)</c>, where <c>L</c> is a list of key-value pairs
 
755
      created by the shell. Currently there is only one pair:
 
756
      <c>{history, N}</c>, where N is the current command number. The
 
757
      function should return a list of characters or an atom. This
 
758
      constraint is due to the Erlang I/O-protocol. Unicode characters
 
759
      beyond codepoint 255 are allowed in the list. Note
 
760
      that in restricted mode the call <c>Mod:Func(L)</c> must be
 
761
      allowed or the default shell prompt function will be called.</p>
 
762
      </section>
 
763
 
740
764
  <funcs>
741
765
    <func>
742
766
      <name>history(N) -> integer()</name>
780
804
      </desc>
781
805
    </func>
782
806
    <func>
 
807
      <name>prompt_func(PromptFunc) -> prompt_func()</name>
 
808
      <fsummary>Sets the shell prompt</fsummary>
 
809
      <type>
 
810
        <v>PromptFunc = prompt_func()</v>
 
811
        <v>prompt_func() = default | {Mod, Func}</v>
 
812
        <v>Mod = Func = atom()</v>
 
813
      </type>
 
814
      <desc>
 
815
        <p>Sets the shell prompt function to <c>PromptFunc</c>. The
 
816
          previous prompt function is returned.</p>
 
817
      </desc>
 
818
    </func>
 
819
    <func>
783
820
      <name>start_restricted(Module) -> ok | {error, Reason}</name>
784
821
      <fsummary>Exits a normal shell and starts a restricted shell.</fsummary>
785
822
      <type>