aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/tty.xml
blob: 7d662a28490b9a85f93c971e870d5f345873a69b (plain) (blame)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>1996</year><year>2010</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.

    </legalnotice>

    <title>tty - A command line interface</title>
    <prepared>ETX/B/SFP C. Granbom</prepared>
    <responsible></responsible>
    <docno></docno>
    <approved>EPK/TE (K. Boortz)</approved>
    <checked></checked>
    <date>1996-11-01</date>
    <rev>A</rev>
    <file>tty.xml</file>
  </header>
  <p><c><![CDATA[tty]]></c> is a simple command line interface program where keystrokes are collected and interpreted. Completed lines are sent to the shell for interpretation. There is a simple history mechanism, which saves previous lines. These can be edited before sending them to the shell.
    <c><![CDATA[tty]]></c> is started when Erlang is started with the command:<br></br></p>
  <p><em>erl</em></p>
  <p><c><![CDATA[tty]]></c> operates in one of two modes:<br></br></p>
  <list type="bulleted">
    <item>
      <p><em>normal mode</em>, in which lines of text can be edited and sent to the shell.</p>
    </item>
    <item>
      <p><em>shell break</em> mode, which allows the user to kill the current shell, start multiple shells etc. Shell break mode is started by typing <em>Control G</em>.</p>
    </item>
  </list>

  <section>
    <title>Normal Mode</title>
    <p>In normal mode keystrokes from the user are collected and interpreted by <c><![CDATA[tty]]></c>. Most of the <em>emacs</em> line editing commands are supported. The following is a complete list of the supported line editing commands.<br></br></p>
    <p><em>Note:</em>	The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>. 
      </p>
    <table>
      <row>
        <cell align="left" valign="middle"><em>Key Sequence</em></cell>
        <cell align="left" valign="middle"><em>Function</em></cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-a</cell>
        <cell align="left" valign="middle">Beginning of line</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-b</cell>
        <cell align="left" valign="middle">Backward character</cell>
      </row>
      <row>
        <cell align="left" valign="middle">M-b</cell>
        <cell align="left" valign="middle">Backward word</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-d</cell>
        <cell align="left" valign="middle">Delete character</cell>
      </row>
      <row>
        <cell align="left" valign="middle">M-d</cell>
        <cell align="left" valign="middle">Delete word</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-e</cell>
        <cell align="left" valign="middle">End of line</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-f</cell>
        <cell align="left" valign="middle">Forward character</cell>
      </row>
      <row>
        <cell align="left" valign="middle">M-f</cell>
        <cell align="left" valign="middle">Forward word</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-g</cell>
        <cell align="left" valign="middle">Enter shell break mode</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-k</cell>
        <cell align="left" valign="middle">Kill line</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-l</cell>
        <cell align="left" valign="middle">Redraw line</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-n</cell>
        <cell align="left" valign="middle">Fetch next line from the history buffer</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-p</cell>
        <cell align="left" valign="middle">Fetch previous line from the history buffer</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-t</cell>
        <cell align="left" valign="middle">Transpose characters</cell>
      </row>
      <row>
        <cell align="left" valign="middle">C-y</cell>
        <cell align="left" valign="middle">Insert previously killed text</cell>
      </row>
      <tcaption>tty text editing</tcaption>
    </table>
  </section>

  <section>
    <title>Shell Break Mode</title>
    <p><em>tty</em> enters <em>shell</em> break mode when you type <em>Control G</em>. In this mode you can:<br></br></p>
    <list type="bulleted">
      <item>
        <p>Kill or suspend the current shell</p>
      </item>
      <item>
        <p>Connect to a suspended shell</p>
      </item>
      <item>
        <p>Start a new shell</p>
      </item>
    </list>
  </section>
</chapter>