From 1979a8864068a0b9fed31a5b0d9bb24e236abbf4 Mon Sep 17 00:00:00 2001 From: TitanSnow Date: Wed, 10 May 2017 16:12:29 +0800 Subject: Revert "save/load replhistory" This reverts commit 81814d7fa83419d0f23d8c76226c2f7f16aaa63c. --- xmake/plugins/lua/xmake.lua | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'xmake/plugins/lua/xmake.lua') diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua index bef62203b..1c6b2bf27 100644 --- a/xmake/plugins/lua/xmake.lua +++ b/xmake/plugins/lua/xmake.lua @@ -34,8 +34,6 @@ task("lua") -- imports import("core.base.option") import("core.sandbox.sandbox") - import("core.project.history") - import("lib.readline") -- list all scripts? if option.get("list") then @@ -58,28 +56,8 @@ task("lua") import("scripts." .. name).main(unpack(option.get("arguments") or {})) end else - -- clear history - readline.clear_history() - - -- load history - local replhistory = history.load("replhistory") or {} - for _, ln in ipairs(replhistory) do - readline.add_history(ln) - end - -- enter interactive mode sandbox.interactive() - - -- save to history - local entries = readline.get_history_state().entries - if #entries > #replhistory then - for i = #replhistory+1, #entries do - history.save("replhistory", entries[i].line) - end - end - - -- clear history - readline.clear_history() end end) -- cgit v1.3.1