@@ -12,14 +12,16 @@ or start :ref:`tarantoolctl <tarantoolctl>` with ``enter``.
12
12
The interactive console is often called the Lua console to distinguish it from the administrative console,
13
13
but in fact it can handle both Lua and SQL input.
14
14
15
- The majority of examples in this manual show what users see with the
16
- interactive console, including the prompt (which can be ``tarantool> ``),
17
- the instruction (which can be a Lua request or an SQL statement),
18
- and the response (which can be a display in either YAML format or Lua format).
15
+ The majority of examples in this manual show what users see with the interactive console.
16
+ It includes:
17
+
18
+ * ``tarantool> `` prompt
19
+ * instruction (a Lua request or an SQL statement)
20
+ * response (a display in either YAML or Lua format)
19
21
20
22
.. code-block :: none
21
23
22
- -- Typical interactive console example with Lua input and YAML output
24
+ -- Interactive console example with Lua input and YAML output
23
25
tarantool> box.info().replication
24
26
---
25
27
- 1:
@@ -28,19 +30,22 @@ and the response (which can be a display in either YAML format or Lua format).
28
30
lsn: 0
29
31
...
30
32
33
+ .. _interactive_console_input_output :
34
+
35
+ Interactive console input and output
36
+ ------------------------------------
37
+
31
38
The **input language ** can be changed to SQL with ``\set language sql ``
32
39
or changed to Lua (the default) with ``\set language lua ``.
33
40
34
41
The **delimiter ** can be changed to any character with :samp: `\s et delimiter <character> `.
35
42
The default is nothing, which means input does not need to end with a delimiter.
36
43
But a common recommendation is to say ``set delimiter ; `` especially if input is SQL.
37
44
38
- .. _interactive_console_output :
39
-
40
45
The **output format ** can be changed to Lua with ``\set output lua ``
41
46
or changed to YAML (the default) with ``\set output yaml ``.
42
47
43
- Ordinarily. output from the console has `YAML format <http://yaml.org/spec >`_.
48
+ Ordinarily, output from the console has `YAML format <http://yaml.org/spec >`_.
44
49
That means that there is a line for document-start ``"---" ``,
45
50
and each item begins on a separate line starting with ``"- " ``,
46
51
and each sub-item in a nested structure is indented,
@@ -54,7 +59,7 @@ So, when input is a Lua object description, output will equal input.
54
59
55
60
YAML is good for readability.
56
61
Lua is good for re-using results as requests.
57
- A third format, MsgPack, is good for database storage.
62
+ The third format, MsgPack, is good for database storage.
58
63
Currently the default output format is YAML but it may be Lua in a future version,
59
64
and it may be Lua if
60
65
the last :ref: `set_default_output <console-set_default_output >`
@@ -120,3 +125,30 @@ call was ``console.set_default_output('lua')``.
120
125
| :code:`...`
121
126
122
127
- :code: `\x 81 \x a3 \x 6b \x 65 \x 79 \x 01 `
128
+
129
+ .. _interactive_console-shortcuts :
130
+
131
+ Keyboard shortcuts
132
+ ------------------
133
+
134
+ Since :doc: `2.10.0 </release/2.10.0 >`.
135
+
136
+ .. list-table ::
137
+ :widths: 25 75
138
+ :header-rows: 1
139
+
140
+ * - Keyboard shortcut
141
+ - Effect
142
+
143
+ * - ``CTRL+C ``
144
+ - Discard current input with the ``SIGINT `` signal in the console mode and
145
+ jump to a new line with a default prompt.
146
+
147
+ * - ``CTRL+D ``
148
+ - Quit Tarantool interactive console.
149
+
150
+ .. important ::
151
+
152
+ Keep in mind that ``CTRL+C `` shortcut will shut Tarantool down if there is any currently running command
153
+ in the console.
154
+ The :ref: `SIGINT <admin-server_signals >` signal stops the instance running in a daemon mode.
0 commit comments