@@ -12,14 +12,16 @@ or start :ref:`tarantoolctl <tarantoolctl>` with ``enter``.
1212The interactive console is often called the Lua console to distinguish it from the administrative console,
1313but in fact it can handle both Lua and SQL input.
1414
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)
1921
2022.. code-block :: none
2123
22- -- Typical interactive console example with Lua input and YAML output
24+ -- Interactive console example with Lua input and YAML output
2325 tarantool> box.info().replication
2426 ---
2527 - 1:
@@ -28,19 +30,22 @@ and the response (which can be a display in either YAML format or Lua format).
2830 lsn: 0
2931 ...
3032
33+ .. _interactive_console_input_output :
34+
35+ Interactive console input and output
36+ ------------------------------------
37+
3138The **input language ** can be changed to SQL with ``\set language sql ``
3239or changed to Lua (the default) with ``\set language lua ``.
3340
3441The **delimiter ** can be changed to any character with :samp: `\s et delimiter <character> `.
3542The default is nothing, which means input does not need to end with a delimiter.
3643But a common recommendation is to say ``set delimiter ; `` especially if input is SQL.
3744
38- .. _interactive_console_output :
39-
4045The **output format ** can be changed to Lua with ``\set output lua ``
4146or changed to YAML (the default) with ``\set output yaml ``.
4247
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 >`_.
4449That means that there is a line for document-start ``"---" ``,
4550and each item begins on a separate line starting with ``"- " ``,
4651and 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.
5459
5560YAML is good for readability.
5661Lua 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.
5863Currently the default output format is YAML but it may be Lua in a future version,
5964and it may be Lua if
6065the last :ref: `set_default_output <console-set_default_output >`
@@ -120,3 +125,30 @@ call was ``console.set_default_output('lua')``.
120125 | :code:`...`
121126
122127 - :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