blob: c33e082f4fe6976b1f70b67b199a7c02c05b13a8 (
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1996</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions 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. A simple history mechanism saves previous lines,
which can be edited before sending them to the shell. <c><![CDATA[tty]]></c>
is started when Erlang is started with the following command:</p>
<pre>
erl</pre>
<p><c><![CDATA[tty]]></c> operates in one of two modes:</p>
<list type="bulleted">
<item>
<p>Normal mode, in which text lines can be edited and sent to the
shell.</p>
</item>
<item>
<p>Shell break mode, which allows the user to kill the current shell,
start multiple shells, and so on.</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.</p>
<p>Typographic conventions:</p>
<list type="bulleted">
<item><c>C-a</c> means pressing the <em>Ctrl</em> key and the letter
<c>a</c> simultaneously.</item>
<item><c>M-f</c> means pressing the <em>Esc</em> key and the letter
<c>f</c> in sequence.</item>
<item><c>Home</c> and <c>End</c> represent the keys with the same
name on the keyboard.</item>
<item><c>Left</c> and <c>Right</c> represent the corresponding arrow
keys.</item>
</list>
<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">Home</cell>
<cell align="left" valign="middle">Beginning of line</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">C-Left</cell>
<cell align="left" valign="middle">Backward word</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">End</cell>
<cell align="left" valign="middle">End of line</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">C-Right</cell>
<cell align="left" valign="middle">Forward word</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-u</cell>
<cell align="left" valign="middle">Backward 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-w</cell>
<cell align="left" valign="middle">Backward kill word</cell>
</row>
<row>
<cell align="left" valign="middle">C-y</cell>
<cell align="left" valign="middle">Insert previously killed text</cell>
</row>
<row>
<cell align="left" valign="middle">C-]</cell>
<cell align="left" valign="middle">Insert matching closing bracket</cell>
</row>
<tcaption>tty Text Editing</tcaption>
</table>
</section>
<section>
<title>Shell Break Mode</title>
<p>In this mode the following can be done:</p>
<list type="bulleted">
<item>Kill or suspend the current shell</item>
<item>Connect to a suspended shell</item>
<item>Start a new shell</item>
</list>
</section>
</chapter>
|