Closed
Description
Product: tt CLI
Since: ?
Audience/target: all
Root document: ? https://www.tarantool.io/en/doc/latest/reference/tooling/interactive_console/
? https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/connect/
SME: @ GRISHNOV
Details
The patchset introduces addition commands for the tt connect
console.
It adds several common commands that relate to a general functionality:
\help
,?
- to show help message with additional information and
a list of all commands.\quit
,\q
- quit from the console. Previously this command worked
on thetarantool
side, but now it works on thett
side and does
not require execution rights for a user.
In addition, the patch adds commands for extended output modes:
\set output <format>
- set format lua, table, ttable or
yaml (default)\set table_format <format>
- set table format default, jira
or markdown\set graphics <false/true>
- disables/enables (default)
pseudographics for table modes\set table_column_width <width>
- set max column width for
table/ttable\xw <width>
- set max column width for table/ttable\x
- switches output format cyclically\x[l,t,T,y]
- set output format lua, table, ttable or yaml\x[g,G]
- disables/enables pseudographics for table modes
Supported formats:
yaml
- shows data as a YAML document. The format is
used now bytarantool
andtt
.lua
- shows data as Lua-compatible structs.table
- shows data as a pseudo graphical table.ttable
- the same as the table format, but a result table is
transposed (rotate data from rows to columns).
Supported table formats (for table
or ttable
formats):
default
- shows data as a pseudo graphical table.markdown
- shows data as a Markdown-compatible table.jira
- shows data as a Jira-compatible table.
Example:
> \set output table
> box.space.customers:select()
+------+-----------+------+
| col1 | col2 | col3 |
+------+-----------+------+
| 1 | Elizabeth | 12 |
+------+-----------+------+
> \xg
> box.space.customers:select()
col1 col2 col3
1 Elizabeth 12
2 Mary 46
3 David 33
Requested by @GRISHNOV in tarantool/tt@5189d4f.
Definition of done
- Define the relation between tt console and tarantool console to find the proper place for this doc
- Describe the new formatting capabilities in the console documentation