From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@freelists.org> Cc: Alexander Turenko <alexander.turenko@tarantool.org>, Konstantin Osipov <kostja@tarantool.org>, Cyrill Gorcunov <gorcunov@gmail.com> Subject: [tarantool-patches] [PATCH 4/4] box/console: Provide console.eos() api Date: Thu, 15 Aug 2019 17:42:57 +0300 [thread overview] Message-ID: <20190815144257.9405-5-gorcunov@gmail.com> (raw) In-Reply-To: <20190815144257.9405-1-gorcunov@gmail.com> Thus other modules would be able to find out what eos marker is currently active. For example when reading replies from remote server via text based console protocol. @TarantoolBot document Title: > require('console').eos() Returns a string with currently active end of string marker. Part-of #3834 --- src/box/lua/console.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index 0c30ccd42..5df02dc75 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -152,6 +152,10 @@ local function current_eos() return output_eos[d["fmt"]] end +local function get_current_eos() + return tostring(current_eos()) +end + -- -- Map output format into a "\set" command. local function output_cmd_string() @@ -769,6 +773,7 @@ package.loaded['console'] = { delimiter = delimiter; set_default_output = set_default_output; get_default_output = get_default_output; + eos = get_current_eos; ac = ac; connect = connect; listen = listen; -- 2.20.1
prev parent reply other threads:[~2019-08-15 14:46 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-15 14:42 [tarantool-patches] [PATCH 0/4] box/console: Improve lua mode for remote console Cyrill Gorcunov 2019-08-15 14:42 ` [tarantool-patches] [PATCH 1/4] box/console: Add explicit output EOS mapping Cyrill Gorcunov 2019-08-15 14:42 ` [tarantool-patches] [PATCH 2/4] box/console: Refactor command handling Cyrill Gorcunov 2019-08-15 14:42 ` [tarantool-patches] [PATCH 3/4] box/console: Fix hang in remote console lua mode Cyrill Gorcunov 2019-08-15 14:42 ` Cyrill Gorcunov [this message]
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=20190815144257.9405-5-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=alexander.turenko@tarantool.org \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH 4/4] box/console: Provide console.eos() api' \ /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