[tarantool-patches] [PATCH 4/4] box/console: Provide console.eos() api
Cyrill Gorcunov
gorcunov at gmail.com
Thu Aug 15 17:42:57 MSK 2019
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
More information about the Tarantool-patches
mailing list