Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Alexander Turenko <alexander.turenko@tarantool.org>,
	Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [tarantool-patches] Re: [RFC] box/lua/console: Add console.fmt module
Date: Fri, 21 Jun 2019 10:32:41 +0300	[thread overview]
Message-ID: <20190621073241.GJ18958@atlas> (raw)
In-Reply-To: <20190620215405.9338-1-gorcunov@gmail.com>

* Cyrill Gorcunov <gorcunov@gmail.com> [19/06/21 00:55]:
> The rationale of the module is to provide a way to configure
> console output format, in particular one might need to copy
> results of eval and paste it into some other command. To
> switch console into that named lua mode one need to type
> 
> > require('console.fmt').set_format('lua')
> 
> To set it back to yaml mode just type
> 
> > require('console.fmt').set_format('yaml')
> 
> At the moment these two modes are supprted only.

We should have a meta command for this as well:

\set output format lua
\set output format yaml

Are you sure we need a separate namespace for fmt, wouldn't
console.set_format() be enough?

> index 000000000..f860d76fb
> --- /dev/null
> +++ b/src/box/lua/console_fmt.lua
> @@ -0,0 +1,295 @@
> +-- # vim: ts=4 sw=4 et
> +
> +local internal = require('console')
> +
> +local console_formats = {
> +    ["lua"] = nil,
> +    ["yaml"] = nil
> +}

Why didn't  you use a git submodule with an established Lua
formatter?

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-06-21  7:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 21:54 [tarantool-patches] " Cyrill Gorcunov
2019-06-21  7:32 ` Konstantin Osipov [this message]
2019-06-21  7:36   ` [tarantool-patches] " Konstantin Osipov
2019-06-21  8:09     ` Cyrill Gorcunov
2019-06-21 12:11       ` Konstantin Osipov
2019-06-21 12:33         ` Cyrill Gorcunov
2019-06-21  8:16   ` Cyrill Gorcunov
2019-06-21 12:14     ` Konstantin Osipov
2019-06-21 12:41       ` Cyrill Gorcunov
2019-06-21 12:47         ` Konstantin Osipov
2019-06-21 13:17           ` Cyrill Gorcunov
2019-06-21 20:07       ` Cyrill Gorcunov
2019-06-21 20:33         ` Konstantin Osipov
2019-06-21 22:34           ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190621073241.GJ18958@atlas \
    --to=kostja@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [RFC] box/lua/console: Add console.fmt module' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox